summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-11-15 13:09:07 (GMT)
committervincentdarley <vincentdarley>2004-11-15 13:09:07 (GMT)
commit50af33b1a13e1b6c55e100130ec1e8c22e4beab6 (patch)
treedddeeb456d6e4da0dcc9a3bb66c685a26b076343 /generic/tkText.c
parentba85d89c22482d574a5c07593b1fcb57e19451eb (diff)
downloadtk-50af33b1a13e1b6c55e100130ec1e8c22e4beab6.zip
tk-50af33b1a13e1b6c55e100130ec1e8c22e4beab6.tar.gz
tk-50af33b1a13e1b6c55e100130ec1e8c22e4beab6.tar.bz2
fix to one multi-line search bug
Diffstat (limited to 'generic/tkText.c')
-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;