Closed iqbalansari closed 8 years ago
Great catch. I just committed a change (https://github.com/mm--/ace-mc/commit/a7dbff6daa2c712d2496ebd111dee5cb3f6320a0) which hopefully fixes it. Reopen this if it doesn't work. Thanks!
Thanks for the quick fix!
Steps to reproduce -
1) Open a blank buffer and enter the text
za
2) Run the commandace-mc-add-multiple-cursors
3) Enter the letterz
Expected result - A cursor is added at
z
Actual result - The command fails with
It seems the infinite loop happens because
ace-mc-add-char
calls function pointed byace-mc-ace-mode-function
(which is bound toace-jump-word-mode
),ace-jump-word-mode
in turn callsace-jump-do
which runs theace-jump-mode-end-hook
. In case oface-mc
, the functionace-mc-maybe-jump-end
is executed as a part of the hook which callsace-mc-add-char
again leading to the infinite loop.