<p>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).<br>
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.<br>
Changes should be done in editor_highlight_braces and goto_matching_brace.<br>
I attached these two functions. I also attached three screenshots demonstrating the highlighting logic.<br>
<a href="https://github.com/geany/geany/files/2834062/editor_highlight_braces-functon.txt">editor_highlight_braces-functon.txt</a><br>
<a href="https://github.com/geany/geany/files/2834063/goto_matching_brace-function.txt">goto_matching_brace-function.txt</a></p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/39743460/52307100-aea61100-2967-11e9-83c5-48fe9e8f5678.png"><img src="https://user-images.githubusercontent.com/39743460/52307100-aea61100-2967-11e9-83c5-48fe9e8f5678.png" alt="screenshot from 2019-02-03 12-59-39" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/39743460/52307101-aea61100-2967-11e9-9cdf-83312bdda202.png"><img src="https://user-images.githubusercontent.com/39743460/52307101-aea61100-2967-11e9-9cdf-83312bdda202.png" alt="screenshot from 2019-02-03 12-59-53" style="max-width:100%;"></a><br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/39743460/52307102-aea61100-2967-11e9-9983-281655101a36.png"><img src="https://user-images.githubusercontent.com/39743460/52307102-aea61100-2967-11e9-9983-281655101a36.png" alt="screenshot from 2019-02-03 13-00-12" style="max-width:100%;"></a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1998#issuecomment-460821742">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJznV_CSX_6NTBlVZEFORAJR0JuwSks5vKf-OgaJpZM4YziNa">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ90jdQj6uc5gSTeaWUFhYIHhhX9hks5vKf-OgaJpZM4YziNa.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@dyura in #1998: 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). \r\nThe 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.\r\nChanges should be done in editor_highlight_braces and goto_matching_brace.  \r\nI attached these two functions. I also attached three screenshots demonstrating the highlighting logic.\r\n[editor_highlight_braces-functon.txt](https://github.com/geany/geany/files/2834062/editor_highlight_braces-functon.txt)\r\n[goto_matching_brace-function.txt](https://github.com/geany/geany/files/2834063/goto_matching_brace-function.txt)\r\n\r\n![screenshot from 2019-02-03 12-59-39](https://user-images.githubusercontent.com/39743460/52307100-aea61100-2967-11e9-83c5-48fe9e8f5678.png)\r\n![screenshot from 2019-02-03 12-59-53](https://user-images.githubusercontent.com/39743460/52307101-aea61100-2967-11e9-9cdf-83312bdda202.png)\r\n![screenshot from 2019-02-03 13-00-12](https://user-images.githubusercontent.com/39743460/52307102-aea61100-2967-11e9-9983-281655101a36.png)\r\n"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1998#issuecomment-460821742"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/1998#issuecomment-460821742",
"url": "https://github.com/geany/geany/issues/1998#issuecomment-460821742",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>