Moveable multi-line carets
-
@Coises said in Moveable multi-line carets:
That seems like a bug. Typing in column mode should leave you with a Scintilla thin selection , which behaves like a zero-width column selection, not like a multi-caret selection. I’ll have to install an older version to check, but I’m pretty sure that is new, and potentially very disconcerting, behavior.
I have started several times to try to accurately describe the issue so I can post a bug report but have discovered it’s not easy to pin down just where v8.5.8 and v8.6 diverge. v8.5.8 and earlier already seems to have a multi-caret mode. My notes so far have:
I tend to use the keyboard when using Notepad++.
I have the following:
p01 p02 p03 p04 p05 p06 p07 p08 p09
and want to change the leading
p
to0
(zero). I deal with this by positioning the cursor at the front ofp01
and then with the Shift+Alt keys held down I down-arrow to the line withp09
and then while still holding Shift+Alt down I right-arrow once to create a 9x1 column selection of the letterp
. I then type0
to replace thep
with0
.I think Scintilla is now in SC_SEL_THIN for both v8.5.8 and v8.6. Both versions have a 9 line high cursor blinking after the
0
I just typed. For both the status line changed fromSel : 9x 1 = 9
toSel 9 : 0 | 9
when I typed the0
.
My notes end there for now as I saw that
Esc
behaves the same and typing characters behave the same in both versions. Both versions have a 9 line high cursor. I am used to this and have regularly taken advantage of it in v858 and earlier.I know there is a point of divergence here where any of the arrow keys causes v858 to go back to single cursor mode. When I use any of the arrow keys in v86 it remains in multi-cursor mode. That seems simple enough but the Esc key before and after arrow keys needs to get explored a bit more before I’m not yet comfortable with asking via github that the behavior get changed or at least made configurable.
-
@mkupper Based on some quick testing, I think:
One piece of the puzzle is that the status bar shows Sel: nx0 = 0 for a zero-width rectangular selection (which is not, per Scintilla’s definition, the same as a thin selection, though it looks and behaves identically to the user), but shows Sel n : 0 | n both for thin selections and for multiple selections in which every selection is empty.
Pressing Esc clears all but the primary selection of a multiple selection, but has no effect on a rectangular selection or a thin selection.
If you make a rectangular selection and use Shift+arrow-keys to modify it, it immediately changes to a multiple selection. If you use Alt+Shift+arrow-keys, it remains a rectangular selection. (This part is visible in the status bar.) If you type in either situation, the result looks the same — all the cursors in line, and the status bar shows Sel n : 0 | n — but the result of pressing Esc is different, because if you typed into a multiple selection, you now have a empty multiple selection (which Esc will reduce to the primary selection); but if you typed into a rectangular selection, you get a thin selection (which Esc does not affect).
So I’d say one of the errors here, which based on your description is not new to 8.6, is that the status bar fails to differentiate between a thin selection and a multiple selection. (In my opinion a thin selection should appear the same as a zero-width rectangular selection, because there is no difference in user-facing behavior.)
Edit to add: Another difference which may be observed between rectangular selections (including zero-width rectangular selections and thin selections) and multiple selections (including empty multiple selections) which only look like rectangular selections is that when you switch to another tab and then switch back, rectangular selections are restored, but multiple selections are not.
-
Some observations:
-
You seem to have a good grasp on all of this
-
Due to that good grasp, perhaps you are the best person to put in some official issues on the problems with these behaviors
-
You say above “If you type in either situation…because if you typed into…but if you typed into…” – What did the user type here? More arrow keys/combos or actual text?
-
-
@Alan-Kilborn said in Moveable multi-line carets:
put in some official issues on the problems with these behaviors
I still need to find time to install a previous version and compare it with the current version, and to look at the actual code changes. I almost never use multiple selections (other than rectangular selections), so I’m not able, by memory, to recognize the difference between what used to be and what is now. Assuming I can get it clear in my own mind, if there isn’t already an issue at that time, I’ll enter one.
- You say above “If you type in either situation…because if you typed into…but if you typed into…” – What did the user type here? More arrow keys/combos or actual text?
I meant typing a character.
-
@Coises said in Moveable multi-line carets:
I almost never use multiple selections (other than rectangular selections)
This is very likely the way it is for most users; certainly true for me as well.
-
@Alan-Kilborn I feel a bit stupid asking this question, but… is there a list of the intended changes in multi-caret editing? The release notes only say, “Multi-edit is the main feature of this version”; but making and editing multiple selections (with the now-removed checkbox checked) was already possible. What actually, intentionally, changed (besides removing the option to disable Ctrl+mouse multi-selection)?
-
@Alan-Kilborn said in Moveable multi-line carets:
official issues
I see one already open:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14464
-
@László-Botka said in Moveable multi-line carets:
Is this by design? How can I avoid this?
I see here:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14266
that it is by design, and there is (apparently by the developer’s choice) no option to disable it.
This is annoying for people who use rectangular selections often while rarely if ever using multiple cursors. The solution seems to be to get in the habit of pressing an arrow key (which converts the rectangular selection to an empty multiple selection) and then pressing the Escape key. I believe that will always work.
-
@Coises said in Moveable multi-line carets:
I feel a bit stupid asking this question, but… is there a list of the intended changes in multi-caret editing?
No reason to feel that way about it.
What kicked off the recent development of the feature was THIS. And yes, I say sheepishly, it was all MY fault. :-)
The user “bitagoras” was a major protagonist on how it should work, i.e, the fancier parts of it.
Sure the basics of making multiple selections was already there, but it was rather like musicians warming up individually for the symphonic performance to come. The attempt was made to get it all working in-concert…and that’s where we’re at now.
-
@Alan-Kilborn said in Moveable multi-line carets:
Sure the basics of making multiple selections was already there, but it was rather like musicians warming up individually for the symphonic performance to come. The attempt was made to get it all working in-concert…and that’s where we’re at now.
I guess the discussion (especially the spin-off to Issue #14266) attracted people who use multi-edit more than they use rectangular selections, and escaped the notice of folks who use rectangular selections all the time and almost never intentionally make a multiple stream selection.
I left a comment on Issue#14464, but I suspect that ship has already sailed. :-(