Two consecutive "go to matching brace" commands have to return us to the 
original position. After we moved to the matching brace, we still should see 
the same brace pair highlighted. All Scintilla-based editors have the problem. 
Scintilla doesn't necessarily return us to the initial position after the 
subsequent matching brace jumps. After the first jump Scintilla often 
highlights nearby brace pair. It is so because Scintilla attempts to place the 
cursor following to outside or inside braces logic. However, when the cursor is 
between two braces, Scintilla highlights only the first, left brace. 
I will provide with two examples. (bold+italic parenthesis indicate the 
highlighted braces. The exclamation sign indicates the cursor position. )  
First example:  ( )( )
Place the cursor after the last brace:   
( )_**( )!**_    
do twice "go to matching brace"  and we see the cursor before the fist brace.  
**_!( )_**( )
Second example:  (((( f1+1 )^f2)+(  f3+1 ))^f4)
Place the cursor after the second brace.  
(**_(!_**(( f1+1 )^f2)+(  f3+1 )**_)_**^f4)
do twice "go to matching brace"  and we see where the cursor is .
(((( f1+1 )^f2)+**_!(_** f3+1 **_)_**)^f4) 
People who are used to work with other editors are confused.  As a workaround, 
I made a LUA script that goes to matching brace and always keeps the same 
braces highlighted. 
(https://github.com/dyura/LUA-scripts-for-text-editors/blob/master/Geany/GoToHighlightedBrace)
 
At the same time, I think that this problem should be solved at the project 
level.

-- 
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

Reply via email to