Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Auto edit delimiters should cancel sooner #2395
I know a fix just went in to resolve this but i personally think it could be cancelled sooner. Right now the only time the double cursor is disabled is if I hold Shift and continue the selection in the original direction. Any other key movement, with or without shift will keep the double cursor enabled.
I think the second cursor should be gone as soon as the cursor leaves the initial delimiter
Steps to Reproduce
Let me know if you want a gif for these.
Hmm. This is a feature of Scintilla. When you have multiple carets (no matter how they were created), any arrow keys will move all carets. While I agree in theory with what you expect to happen, programatically detecting this scenario may be tricky, or at least not very efficient (performing a check every single time the cursor is moved).
The workaround is to press Escape.
I think we could simply monitor the next keypress, if it doesnt have a value (JS can tell you the "value" of a keypress) then we cancel the multi-caret. Stuff like left arrow, shift left arrow, etc. should not have a value.
I can look into this if you like @mitchell-as? Seems at this point it's mainly a matter of interpreting events. I think the scintilla specific stuff has been handled, unless you have another idea?