From kde-commits Mon Jul 02 13:33:30 2012 From: Dominik Haumann Date: Mon, 02 Jul 2012 13:33:30 +0000 To: kde-commits Subject: [kate] part/document: first check for matching bracket, so " in principle works Message-Id: <20120702133330.E8BC9A60C9 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=134123624317079 Git commit 00d5d80ccb3147d8fa7faa445a6f0deec5b0a24a by Dominik Haumann. Committed on 02/07/2012 at 15:15. Pushed by dhaumann into branch 'master'. first check for matching bracket, so " in principle works M +3 -3 part/document/katedocument.cpp http://commits.kde.org/kate/00d5d80ccb3147d8fa7faa445a6f0deec5b0a24a diff --git a/part/document/katedocument.cpp b/part/document/katedocument.cpp index 653c149..48c867f 100644 --- a/part/document/katedocument.cpp +++ b/part/document/katedocument.cpp @@ -3733,9 +3733,7 @@ bool KateDocument::findMatchingBracket( KTextEditor::= Range& range, int maxLines { /* Check for match */ QChar c =3D textLine->at(cursor->column()); - if( c =3D=3D bracket ) { - nesting++; - } else if( c =3D=3D opposite ) { + if( c =3D=3D opposite ) { if( nesting =3D=3D 0 ) { if (searchDir > 0) // forward range.end() =3D cursor->toCursor(); @@ -3744,6 +3742,8 @@ bool KateDocument::findMatchingBracket( KTextEditor::= Range& range, int maxLines return true; } nesting--; + } else if( c =3D=3D bracket ) { + nesting++; } } }