mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2026-02-04 14:22:24 +00:00
Support commands with multiple read-chars
This change fixes commands that read-chars multiple times. Previously, two stage commands like embrace-change would read the same char twice immediately and avy-goto-char-timer would never stop reading input as a cached value was always provided during the timer. Instead, the read-char prompt is included in the cache key so that multiple different calls are cached separately and accessible by the fake cursors.
This commit is contained in:
@@ -130,6 +130,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 new command that inserts two read-chars$"
|
||||
(lambda ()
|
||||
(defun mc-test-temp-command-3 () (interactive) (insert (read-char "first: ")) (insert (read-char "second: ")))
|
||||
(global-set-key (kbd "C-!") 'mc-test-temp-command-3)))
|
||||
|
||||
(Given "^I have bound C-! to a keyboard macro that insert \"_\"$"
|
||||
(lambda ()
|
||||
(fset 'mc-test-temp-kmacro "\C-q_")
|
||||
|
||||
Reference in New Issue
Block a user