From e691606a33fa90a707174889f8d702db14041e26 Mon Sep 17 00:00:00 2001 From: moculus Date: Tue, 17 Jul 2007 08:13:56 +0000 Subject: [PATCH] updated tag matching --HG-- branch : pmacs2 --- method.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/method.py b/method.py index 6ff5c9e..d025bbb 100644 --- a/method.py +++ b/method.py @@ -1328,7 +1328,6 @@ class CloseTag(Method): return i += 1 if i >= len(tokens[y]): - #app.set_error('none found: %d' % (i)) return tag_stack = [] @@ -1347,12 +1346,15 @@ class CloseTag(Method): return if len(tag_stack) == 0: p = Point(token.x, y) - w.set_active_point(p, msg='match found at (%(y)d, %(x)d)') + s = w.buffer.lines[p.y][:p.x+1] + if len(s) > 60: + s = "..." + s[-60:] + msg = 'matches %r' % s + w.set_active_point(p, msg) return i -= 1 y -= 1 i = len(tokens[y]) - 1 - #app.set_error('tag mismatch: no tag found') class CloseParen(CloseTag): mytag = ')'