Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#835 Ctrl-Click: Select word?

Won't_Implement
open
Neil Hodgson
Scintilla (356)
5
2011-07-25
2011-07-24
Mehrdad N.
No

It would be awesome if Ctrl-Click selected the current word, like in Visual Studio.

I'm not sure about the patch, though.

(Sorry for bombarding you with feature requests, hopefully it's not too bad...)

Discussion

  • Neil Hodgson
    Neil Hodgson
    2011-07-25

    Ctrl+Click is used for discontiguous selection.

     
  • Neil Hodgson
    Neil Hodgson
    2011-07-25

    • assigned_to: nobody --> nyamatongwe
    • milestone: --> Won't_Implement
    • labels: --> Scintilla
     
  • Mehrdad N.
    Mehrdad N.
    2011-07-25

    Isn't that control-click-drag, though?

    If the user just does a click and never drags, _and_ there is nothing already selected, why not select what's underneath?

     
  • Neil Hodgson
    Neil Hodgson
    2011-07-25

    No. You can use Ctrl+Click to select several positions and then type to add the same text in each place.

     
  • Mehrdad N.
    Mehrdad N.
    2011-07-25

    Oh I see. :\

    Not even as an _optional_ feature? :(

     
  • Neil Hodgson
    Neil Hodgson
    2011-07-25

    It would be fairly difficult distinguishing Ctrl+Click from Ctrl+Drag since they are both modifying selection in ways that would clash. Would other selections be removed on Ctrl+Click and then readded when the mouse is dragged?

    Turning off discontiguous selection and then allowing Ctrl+Click to be word selection is possible but word selection can already be performed by double click.

     
  • Mehrdad N.
    Mehrdad N.
    2011-07-26

    No need to try and distinguish them -- that's why I suggested an option. :) Just have an option that interprets Ctrl-Click as Select Word if the there is no text already selected. If there's something already selected, then either way it should just add the caret there.

    As for double-click: Yes, I'm aware of that, but on a laptop, every click can be painful; in addition, it's just plain slow. When my left hand is already on the keyboard then a ctrl-click is much faster than a double-click, especially because Windows has some built-in delays between clicks and whatnot.

    Although, if you won't be implementing it, do you have any idea what/where to change at least? I could also change it and recompile it myself, but I'm not sure what to change and where.

    Thanks!

     
  • Neil Hodgson
    Neil Hodgson
    2011-07-26

    There is always a selection even though it may be empty. The suggested behaviour would disallow adding a second selection to an existing empty selection.

    The normal way to implement this on top of a default Scintilla on Windows is to subclass (in the Windows control sense) Scintilla and handle the WM_LBUTTONDOWN.

     
  • Mehrdad N.
    Mehrdad N.
    2011-07-26

    Yes, that's why I said it could be optional -- the user could then choose the behavior when the current selection is empty.

    Hm... I might give it a try if I get the chance, idk; thanks for the info.