[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kate] part/document: first check for matching bracket, so " in principle works
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2012-07-02 13:33:30
Message-ID: 20120702133330.E8BC9A60C9 () git ! kde ! org
[Download RAW message or body]
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 = textLine->at(cursor->column());
- if( c == bracket ) {
- nesting++;
- } else if( c == opposite ) {
+ if( c == opposite ) {
if( nesting == 0 ) {
if (searchDir > 0) // forward
range.end() = cursor->toCursor();
@@ -3744,6 +3742,8 @@ bool KateDocument::findMatchingBracket( KTextEditor::Range& range, int maxLines
return true;
}
nesting--;
+ } else if( c == bracket ) {
+ nesting++;
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic