summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorericm <ericm>2000-01-21 17:25:43 (GMT)
committerericm <ericm>2000-01-21 17:25:43 (GMT)
commit809ff15f94c450ae08db7edb4c6c0d405760664e (patch)
tree55079ad404083b03faafabf25989029cf5e94c9b /generic
parent6efdc96d666911bae091301b1fccb28bc5865437 (diff)
downloadtk-809ff15f94c450ae08db7edb4c6c0d405760664e.zip
tk-809ff15f94c450ae08db7edb4c6c0d405760664e.tar.gz
tk-809ff15f94c450ae08db7edb4c6c0d405760664e.tar.bz2
* tests/text.test:
* generic/tkText.c: Fixed bug relating to regexp searching for empty lines; previously, the starting line was ignored. (bug #1643).
Diffstat (limited to 'generic')
-rw-r--r--generic/tkText.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index cc3db83..fb51ed4 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.12 2000/01/21 03:54:42 hobbs Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.13 2000/01/21 17:25:43 ericm Exp $
*/
#include "default.h"
@@ -1884,7 +1884,8 @@ TextSearchCmd(textPtr, interp, argc, argv)
*/
firstByte = indexInDString;
- if (firstByte >= Tcl_DStringLength(&line)) {
+ if ((firstByte >= Tcl_DStringLength(&line))
+ && !((Tcl_DStringLength(&line) == 0) && !exact)) {
goto nextLine;
}
} else {