Menu

#1940 SCI_CANCEL command in SC_SEL_RECTANGLE mode let's collapse selected rectangle

Bug
closed-fixed
5
2017-05-27
2017-04-24
No

I'm using geany 1.30-1, which does use Scintilla 3.7.3, but behavior was observed already in older versions, too.
I run Ubuntu (12.04), used gtk+-2.0 version is 2.24.10.

Problem: SCI_CANCEL command in SC_SEL_RECTANGLE mode let's collapse the previous selected rectangle to one line.

You can verify this, if you have
1.) selected a column block (e.g by shift-alt+cursor keys).
2.) press ESC to send SCI_CANCEL command
This let's collapse the column block.
To correct the selection, you need to press shift-alt-up, shift-alt-down (or vice versa: shift-alt-down, shift-alt-up). This will restore original selected column block.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2017-04-24
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2017-04-24

    Fix committed as [1f02cb].

     

    Related

    Commit: [1f02cb]

  • Markus Nißl

    Markus Nißl - 2017-04-26

    FYI: Visual Studio removes all selections when pressing ESC, so both single and rectangle selections are cleared.

     
  • Dimitar Zhekov

    Dimitar Zhekov - 2017-04-26

    SCI_CANCEL cancels the current selection mode, and ESC was the simplest way to show that it also altered the selection (already fixed).

    There would be nothing wrong with the ESC or another key clearing the selection, but the command should not do that.

     
  • Neil Hodgson

    Neil Hodgson - 2017-04-26

    Rectangular selection is easy to exit - just make another selection or click the mouse. Multiple selection is more difficult to exit so is canceled with SCI_CANCEL.

    I did think initially of 'fixing' this by dropping the rectangular selection flag when Esc is pressed. Looking back showed that Scintilla versions before multiple selection was implemented would leave the rectangular selection intact. Therefore leaving the rectangular selection can be seen as restoring functionality.

     
  • Neil Hodgson

    Neil Hodgson - 2017-05-27
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB