If the cursor is between two brace characters there has to be a choice to 
highlight the preceding pair or the following pair.  Geany chooses the 
preceding pair.  The goto logic is consistent with the highlight logic. 

This simple logic will always behave as you observed in the OP, whilst 
personally I would have chosen the following pair, the same sorts of things 
will happen if the choice was the following brace.

> This inside-braces/outside-braces logic was designed for a control on the 
> quick selection

I think its designed so the cursor comes back to the original position, if it 
was originally before the brace it ends up back before and if it was originally 
after the brace it ends up back after it, but without having to have any record 
of the state anywhere.  This is consistent with the use-case of finding the 
other end of a code block then returning to editing where you left off.

I don't know the history of the feature, but its called "brace" matching, so it 
likely was originally only {} which do not occur adjacent to one another in 
normal coding idioms, and the problems have come after it expanded to other 
forms of brackets which can occur adjacent to each other.

If you wish to propose an alternative logic, please describe it so it can be 
discussed, simply providing code (especially Lua code in a C/C++ project) and 
expecting contributors to decode its logic just makes your proposal harder to 
consider.

The behaviour of the extra select plugin is for that plugins maintainer to 
decide, if you want to change that, please raise an issue on the plugins 
repository, not all plugin maintainers watch here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1998#issuecomment-442275133

Reply via email to