Intercept some reading commands

- so you won't have to answer them for every single cursor

Fixes #15
This commit is contained in:
Magnar Sveen
2012-09-27 19:42:38 +02:00
parent ae0033fe3d
commit 97da9778fd
3 changed files with 37 additions and 1 deletions

View File

@@ -119,6 +119,13 @@ Feature: Multiple cursors core
And I type "!"
Then I should see "This ! contains the word ! twice"
Scenario: Bound keyboard macros
Given I have bound C-! to a keyboard macro that insert "_"
And I have cursors at "text" in "This text contains the word text twice"
When I press "C-!"
When I press "C-!"
Then I should see "This __text contains the word __text twice"
Scenario: Interprogram paste
Given I have cursors at "text" in "This text contains the word text twice"
When I copy "external" in another program

View File

@@ -68,6 +68,11 @@
(defun mc-test-temp-command-2 () (interactive) (insert ins))
(global-set-key (kbd "C-!") 'mc-test-temp-command-2))))
(Given "^I have bound C-! to a keyboard macro that insert \"_\"$"
(lambda ()
(fset 'mc-test-temp-kmacro "\C-q_")
(global-set-key (kbd "C-!") 'mc-test-temp-kmacro)))
(When "^I go to character \"\\(.+\\)\"$"
(lambda (char)
(goto-char (point-min))