#987 Can't use rectangle select except on identifiers

None
closed-patches-welcome
Lex Trotman
v1.23.1
2
2013-08-24
2013-08-23
Josh @ Dreamland
No

This bug has been around for a while. If you hold control before drag-selecting text to use Scintilla's rectangle selection feature, it only works if you start near an identifier. In other words, it won't work if you're starting in the middle of nowhere, or from characters such as ("");.

This is especially annoying because the key used to rectangle select with the mouse (control) differs from the key used to rectangle select with the keyboard (alt). It might help to support alt-drag for rectangle select as well (so control can be used in the case that alt is drowned out by some Linux window manager, but otherwise they're consistent).

Related

Bugs: #987

Discussion

  • Lex Trotman
    Lex Trotman
    2013-08-24

    The rectangular selection is <ctrl>+<shift>+drag, not <ctrl>+drag.

     
    Last edit: Matthew Brush 2013-08-24
  • Take this block of text:

    ___ abc def ghi 123 !@# () ABC
    ___ abc def ghi 123 !@# () ABC
    ___ abc def ghi 123 !@# () ABC
    

    I can begin a rectangle selection by holding control and dragging from any point in that file, except between columns 19 and 26 (inclusive). Control+Click in column 26 goes to the matching parenthesis. Control+Click on columns 19-23 do nothing, and cannot commence rectangle selection. Control+Click anywhere else starts the selection successfully.

     
    Last edit: Josh @ Dreamland 2013-08-24
  • Lex Trotman
    Lex Trotman
    2013-08-24

    On 24 August 2013 11:23, Josh @ Dreamland joshdreamland@users.sf.netwrote:

    Take this block of text:

    abc def ghi 123 !@# () ABC abc def ghi 123 !@# () ABC ___ abc def
    ghi 123 !@# () ABC

    I can begin a rectangle selection by holding control and dragging from any
    point in that file, except between columns 19 and 26 (inclusive).
    Control+Click in column 26 goes to the matching parenthesis. Control+Click
    on columns 19-23 do nothing, and cannot commence rectangle selection.
    Control+Click anywhere else starts the selection successfully.

    <ctrl>+click/drag is not a selection command. On other applications it
    means to add another selection to the existing multiple selection set, but
    as Geany does not support multiple selections it is not used for that.

    <ctrl>+mouse_down is a go-to definition (if the cursor is on something that
    could be a symbol) or go to matching bracket command if the cursor is not
    on a symbol character.

    Dragging with <ctrl> still down only happens when the symbol is not found
    because Geany then allows the signal to continue in case any plugins want
    to catch it, when they don't the default Scintilla action happens, which
    seems to be to ignore the <ctrl> and start a selection.


    Status: open
    Created: Fri Aug 23, 2013 01:39 PM UTC by Josh @ Dreamland
    Last Updated: Sat Aug 24, 2013 01:14 AM UTC
    Owner: nobody

    This bug has been around for a while. If you hold control before
    drag-selecting text to use Scintilla's rectangle selection feature, it only
    works if you start near an identifier. In other words, it won't work if
    you're starting in the middle of nowhere, or from characters such as ("");
    .

    This is especially annoying because the key used to rectangle select with
    the mouse (control) differs from the key used to rectangle select with the
    keyboard (alt). It might help to support alt-drag for rectangle select as
    well (so control can be used in the case that alt is drowned out by some
    Linux window manager, but otherwise they're consistent).


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/geany/bugs/987/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #987


    Last edit: Matthew Brush 2013-08-24
  • Then I'd like to request that the signal be passed on to Scintilla in the event that the cursor is neither over a parenthesis nor a valid identifier, so at least it will work on columns 19-23 from above. And if alt-drag could be mapped to control-drag, too, that'd be great.

     
  • Lex Trotman
    Lex Trotman
    2013-08-24

    On 24 August 2013 13:06, Josh @ Dreamland joshdreamland@users.sf.netwrote:

    Then I'd like to request that the signal be passed on to Scintilla in the
    event that the cursor is neither over a parenthesis nor a valid identifier,
    so at least it will work on columns 19-23 from above. And if alt-drag could
    be mapped to control-drag, too, that'd be great.

    Why do you want <ctrl>+drag for selecting some text, sometimes?

    Just plain click-drag selects text, there is no reason that I can see to
    add <ctrl>or <alt> drag.

    And <ctrl+shift+drag> selects rectangular text. From the manual, "To use
    it, create a rectangular selection by holding down the Control and Shift
    keys (or Alt and Shift on Windows) while selecting some text."

    Until Geany supports multiple selections, when <ctrl>/<alt>+drag should
    return to its normal use of adding multiple selections, there is no reason
    to change it.


    Status: open
    Created: Fri Aug 23, 2013 01:39 PM UTC by Josh @ Dreamland
    Last Updated: Sat Aug 24, 2013 01:23 AM UTC
    Owner: nobody

    This bug has been around for a while. If you hold control before
    drag-selecting text to use Scintilla's rectangle selection feature, it only
    works if you start near an identifier. In other words, it won't work if
    you're starting in the middle of nowhere, or from characters such as ("");
    .

    This is especially annoying because the key used to rectangle select with
    the mouse (control) differs from the key used to rectangle select with the
    keyboard (alt). It might help to support alt-drag for rectangle select as
    well (so control can be used in the case that alt is drowned out by some
    Linux window manager, but otherwise they're consistent).


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/geany/bugs/987/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #987

  • Lex Trotman
    Lex Trotman
    2013-08-24

    Sigh, I see my habit of writing keynames in angle brackets is interpreted by sourceforge as markup, so the repeat my first post legibly:

    The correct keycode for rectangular select is ctrl+shift+drag not ctrl+drag

     
  • I see. That gets me all sorts of weird glitches; it doesn't clear the selection before starting drag, and so it lets me select a rectangle and a normal area at the same time, and then lets me type with up to three carets on the same line. Pretty peculiar.

     
  • Matthew Brush
    Matthew Brush
    2013-08-24

    Geany's rectangular selection feature is pretty basic. Put the cursor somewhere, <Ctrl>+<Shift>+Click and drag from the cursor position to where the mouse click is released. If you have an existing selection when you start a multiple-selection, the start of the normal selection becomes the start of the multiple-selection.

    If you start typing with a rectangular selection, it replaces the selection on each line with the same character at the multiple-caret at each line.

    It's definitively not as powerful as multiple insertion points in SublimeText, but AFAICT it works as advertised.

     
  • Matthew Brush
    Matthew Brush
    2013-08-24

    Closing pending patches improving behaviour.

     
  • Matthew Brush
    Matthew Brush
    2013-08-24

    • labels: --> multiple rectangular selection
    • status: open --> closed-patches-welcome
    • assigned_to: Lex Trotman
    • Found in: v1.22 --> v1.23.1
    • Priority: 5 --> 2