Le 23/05/2012 21:19, Davide Andreoli a écrit :
2012/5/23 Lex Trotman elextr@gmail.com:
[...]
IMHO the multiselection is now small enough (3 lines) that a plugin would be overkill :)
Davide, what is the impact of enabling this, how do existing features interact with multiple selections? Do any Geany actions that use selections fail when fed a multi-selection? How does paste work? And what if I actually select some text (ie ctrl-swipe not just click).
I did not found any regression nor any strangeness or conflict yet. Yes, you can make real multiple selections (Ctrl+Alt+Drag) and the behavior is quite always the expected: 'copy' while multiple selection active will put in the clipboard all the selected text merged, 'paste' instead will only paste at the primary selection, 'typing' with multiple selection will do the same as a single selection (selected text cleared). All other commands should always work normally on the primary selection(the last one done).
After a very small time of testing I see:
*) Replace (^H) "inside selection" doesn't work properly when there are multiple selections (the replacement is only done in the last selection), while it works fine with rectangular selections. document_replace_sel() should probably be updated then.
BTW, I'm wondering whether Scintilla has two distinct modes for rectangular/multiple selections or if a rectangular selection is a specialized multiple selection (in which case one single code for handling multisel would be enough on our side).
*) Duplicate line/selection works just fine
*) "Toggle case of the selection" is buggy, it puts the newly-cased text altogether on the last selection. Works fine with rectangular selection.
*) Almost all selection-based actions (like "Select current line(s)", "toggle line(s) commentation", etc.) only selects the line of the last selection
IMO Replace and Toggle Case must be updated to work properly. The other selection-based commands that doesn't handle the thing really fine would benefit from handling it, but their result isn't as unexpected as the two cited above.
Regards, Colomban