[Geany-devel] Geany multicursors patch

Lex Trotman elextr at xxxxx
Thu May 24 00:52:29 UTC 2012


[...]
>>
>> You *must* update the documentation to match, making sure you catch
>> all places where such a change might impact.
>
> sure! doc will be my last commit before the pull request
>

Thats what we all say :)

>
>>>
>>>>
>>>>
>> [...]
>>> The multiple selection hard-coded binding (Ctrl+Alt) is "shadowed" by the
>>> rectangular selection
>>> binding (Ctrl). So the only way I found to make multiple selection +
>>> rectangular selection to work
>>> is to change the binding for the rect selection.
>>>
>>> With the patch applied you can make rectangular selection with "Super" and
>>> multiple selections with "Ctrl+Alt".
>>>
>>> Probably you will not like the binding change (I don't like to change it,
>>> I'm quite used to use Ctr for rect selections)  so I'm searching another way
>>> to solve the binding conflict... suggestions are welcome
>>
>> As a GTK app Geany normally tries to follow the Gnome HIG
>> http://developer.gnome.org/hig-book/2.32/hig-book.html#input-mouse
>> section 10.1.2.
>>
>> This specifies ctrl-click as the extend selection input, and it is in
>> the majority of applications.  So despite it having been a Geany
>> setting for a long while, I think it should be changed now that
>> multiple selection is going to be supported.
>>
>> Any suggestions for a replacement for the go to definition binding?
>
> this binding issue is driving me crazy!!
> I don't have a good solution :/
> The situation is:
>
> Ctrl+Alt+click(or drag) -> multiple selections (badly hardcoded in scintilla)

Also ctrl-shift-click or drag extends the rectangular selection

These roughly match the standard definitions of bounding box select
actions and make sense.


> Ctrl+click -> goto definition

Which is badly hard coded at src/editor.c:319

Note that it also does "goto matching brace" if the click isn't on an
identifier.

This is bad practice as we are now finding.  Goto brace has a default
keybinding and goto tag can have one.  They should not be hard coded
to mouse operations.  Although this means the user now needs two
actions not one, the current usage is non-standard and is blocking the
implementation of the standard action.  This action should be removed.

>
> the bind for rectangular selection is strange (at least on my Linux Mint+E17
> environment), should be Ctrl+drag, but I can make rect selection only

That is because the code mentioned above overrides it, performing the
goto action on ctrl+mouse down before it even sees the drag.

[...]> with Ctr+Alt+drag :/
> This key can be changed in scintilla with the api:
> SSM(sci, SCI_SETRECTANGULARSELECTIONMODIFIER, SCMOD_SUPER, 0);
> SCMOD can be CTRL, ALT or SUPER
>
> the only way I found to make both rectangular and multiple selections, is to set
> multiple to Super and thus:
>
> Ctrl+Alt+click(or drag)  ->  multiple selections
> Ctrl+click  ->  goto definition
> Super+drag  ->  rectangular selection
>
> I don't like to use the Super key, and also smell some possible platform
> difference around.
>

As I said above we should change the deviant Geany ctrl+click behavior
so the super isn't necessary.  I guess this is going to provoke some
discussion so I'll start a new thread and maybe you should wait to see
the outcome of that.

Cheers
Lex

>
> btw, thanks for taking the time to follow this issue...and
> give a try at the 'supersnip' branch, it's amazing!  :D

PS can't try it at the moment, all comments "by inspection".



More information about the Devel mailing list