Then I believe we can implement the logic used in MS Visual Studio  editor and 
in Visual Studio Code.  If only one is a brace, the highlighting logic will 
remain as currently: to point a brace the cursor bar can be either before or 
after the brace.  If we have  several braces in a row, the  highlighting should 
be based on the brace position. ( It could be based on after-brace position, 
too. But,  I believe the brace position is more straightforward and more 
consistent for users. I am not talking about OVERWRITE mode when the cursor is 
underline). 
The goto placement should move the caret to matching brace position.  If the 
cursor is after a single brace,  double goto will not return to the initial 
position, however, it will always return to the same brace, that is most 
important.
Changes should be done in editor_highlight_braces and goto_matching_brace.  
I attached these two functions. I also attached three screenshots demonstrating 
the highlighting logic.
[editor_highlight_braces-functon.txt](https://github.com/geany/geany/files/2834062/editor_highlight_braces-functon.txt)
[goto_matching_brace-function.txt](https://github.com/geany/geany/files/2834063/goto_matching_brace-function.txt)

![screenshot from 2019-02-03 
12-59-39](https://user-images.githubusercontent.com/39743460/52307100-aea61100-2967-11e9-83c5-48fe9e8f5678.png)
![screenshot from 2019-02-03 
12-59-53](https://user-images.githubusercontent.com/39743460/52307101-aea61100-2967-11e9-9cdf-83312bdda202.png)
![screenshot from 2019-02-03 
13-00-12](https://user-images.githubusercontent.com/39743460/52307102-aea61100-2967-11e9-9983-281655101a36.png)


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

Reply via email to