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.
Fix committed as [1f02cb].
Related
Commit: [1f02cb]
FYI: Visual Studio removes all selections when pressing ESC, so both single and rectangle selections are cleared.
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.
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.