<p>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.<br>
I will provide with two examples. (bold+italic parenthesis indicate the highlighted braces. The exclamation sign indicates the cursor position. )<br>
First example:  ( )( )<br>
Place the cursor after the last brace:<br>
( )<em><strong>( )!</strong></em><br>
do twice "go to matching brace"  and we see the cursor before the fist brace.<br>
<strong><em>!( )</em></strong>( )<br>
Second example:  (((( f1+1 )^f2)+(  f3+1 ))^f4)<br>
Place the cursor after the second brace.<br>
(<strong><em>(!</em></strong>(( f1+1 )^f2)+(  f3+1 )<strong><em>)</em></strong>^f4)<br>
do twice "go to matching brace"  and we see where the cursor is .<br>
(((( f1+1 )^f2)+<strong><em>!(</em></strong> f3+1 <strong><em>)</em></strong>)^f4)<br>
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. (<a href="https://github.com/dyura/LUA-scripts-for-text-editors/blob/master/Geany/GoToHighlightedBrace">https://github.com/dyura/LUA-scripts-for-text-editors/blob/master/Geany/GoToHighlightedBrace</a>)<br>
At the same time, I think that this problem should be solved at the project level.</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">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJy8zak2lrnfgW2peXfXie_43Xz4Vks5uzCskgaJpZM4YziNa">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJ2ce8JthRNVxMeNp_E2Iu0wSJoxaks5uzCskgaJpZM4YziNa.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://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"A problem with \"go to matching brace\" command. (#1998)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1998"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/1998",
"url": "https://github.com/geany/geany/issues/1998",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "A problem with \"go to matching brace\" command. (#1998)",
"sections": [
{
"text": "",
"activityTitle": "**Yury**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@dyura",
"facts": [
{
"name": "Repository: ",
"value": "geany/geany"
},
{
"name": "Issue #: ",
"value": 1998
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1998,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"geany/geany\",\n\"issueId\": 1998\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/geany/geany/issues/1998"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 416162650\n}"
}
],
"themeColor": "26292E"
}
]</script>