summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-11-15 13:09:07 (GMT)
committervincentdarley <vincentdarley>2004-11-15 13:09:07 (GMT)
commit1a29ddeb51eee54c69ea768fab330d5c6832ee5f (patch)
treedddeeb456d6e4da0dcc9a3bb66c685a26b076343 /generic
parentcb64d6bbcac227409454757c8b69a9c51c6ca52e (diff)
downloadtk-1a29ddeb51eee54c69ea768fab330d5c6832ee5f.zip
tk-1a29ddeb51eee54c69ea768fab330d5c6832ee5f.tar.gz
tk-1a29ddeb51eee54c69ea768fab330d5c6832ee5f.tar.bz2
fix to one multi-line search bug
Diffstat (limited to 'generic')
-rw-r--r--generic/tkText.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index eb7beb7..9f1f6ac 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.54 2004/09/23 14:57:03 vincentdarley Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.55 2004/11/15 13:09:07 vincentdarley Exp $
*/
#include "default.h"
@@ -5530,6 +5530,15 @@ SearchCore(interp, searchSpecPtr, patObj)
|| info.extendStart < 0) {
break;
}
+ /*
+ * If there is a match, but that match starts
+ * after the end of the first line, then we'll
+ * handle that next time around, when we're
+ * actually looking at that line.
+ */
+ if (match && (info.matches[0].start >= lastOffset)) {
+ break;
+ }
if (match && ((firstOffset + info.matches[0].end)
>= prevFullLine)) {
linesSearched = extraLines;