[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 81005] [PATCH] Corresponding parenthesis does not get
From:       Anders Lund <anders () alweb ! dk>
Date:       2004-09-28 7:33:50
Message-ID: 20040928073350.31237.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
        
http://bugs.kde.org/show_bug.cgi?id=81005        
anders alweb dk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From anders alweb dk  2004-09-28 09:33 -------
CVS commit by alund: 

Patch from Jesse to improve the bracket matching alegoritm, attachec to #81005
Backport follows
CCMAIL: 81005-done bugs kde org, "Jesse R. Yurkovich" <yurkjes iit edu>


  M +5 -5      katedocument.cpp   1.754


--- kdelibs/kate/part/katedocument.cpp  #1.753:1.754
 @ -4286,7 +4286,7  @ inline bool isBracket     ( const QChar&
    Bracket matching uses the following algorithm:
    If in overwrite mode, match the bracket currently underneath the cursor.
-   Otherwise, if the character to the left of the cursor is an ending bracket,
-   match it. Otherwise if the character to the right of the cursor is a
-   starting bracket, match it. Otherwise, if the the character to the left
+   Otherwise, if the character to the right of the cursor is an starting bracket,
+   match it. Otherwise if the character to the left of the cursor is a
+   ending bracket, match it. Otherwise, if the the character to the left
    of the cursor is an starting bracket, match it. Otherwise, if the character
    to the right of the cursor is an ending bracket, match it. Otherwise, don't
 @ -4321,9 +4321,9  @ bool KateDocument::findMatchingBracket( 
       return false;
     }
+  } else if ( isStartBracket( right ) ) {
+    bracket = right;
   } else if ( isEndBracket( left ) ) {
     start.setCol(start.col() - 1);
     bracket = left;
-  } else if ( isStartBracket( right ) ) {
-    bracket = right;
   } else if ( isBracket( left ) ) {
     start.setCol(start.col() - 1);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic