Menu

#1494 SCI_CLEAR does not delete EOL in multi-edit (multi-caret) mode

Initial
open
nobody
4
2023-08-24
2023-08-20
Vic
No

Multi-edit mode meant the one you enter with Ctrl+click.
So if you have several carets on empty lines, below shown as vertical segments:

line1
|
line3
|
|
line6

then pressing delete key (bound to SCI_CLEAR if I'm right) does nothing.
The expected result would be:

line1
line3
line6

One can achieve the same end result with the sequence: Arrow-right, Backspace (or SCI_CHARRIGHT, SCI_DELETEBACK).
But it would be more convenient to have SCI_CLEAR work, just like you can delete back with Backspace ( SCI_DELETEBACK) in same situation.

I wasn't sure whether to call it a bug; I guess it's just an omission/ neglected thing?

Discussion

  • Vic

    Vic - 2023-08-21

    (I forgot to type the "carets" in the expected result, they would be at front of line3 and line6)

     
  • Neil Hodgson

    Neil Hodgson - 2023-08-22

    This is to help when lines are of different lengths. Particularly wanted with rectangular selections where you want the selection to remain rectangular.

     
  • Vic

    Vic - 2023-08-24

    I think it only makes sense to disable it for rect. selections.
    For non-rectangular, the user will be aware (from experience) what the effect will be. Similarly to how backspace is allowed.

     

Log in to post a comment.

MongoDB Logo MongoDB