summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-03-11 09:29:29 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-03-11 09:29:29 (GMT)
commit94533b37310c2295093ae8d6f8849f99fd783c92 (patch)
treec13b3502f8c832acb8c65fd5e0986269a00f9bce /generic/tkText.c
parent157a3c8c037e1b1b23d1520cafb55fc65e63820b (diff)
downloadtk-94533b37310c2295093ae8d6f8849f99fd783c92.zip
tk-94533b37310c2295093ae8d6f8849f99fd783c92.tar.gz
tk-94533b37310c2295093ae8d6f8849f99fd783c92.tar.bz2
* generic/tkText.c (DumpLine): [Bug 2968379]: When peers are about,
there can be unnamed marks present during a dump. Ignore them as they will just be for the peers' insert and current marks, which aren't very important.
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index c1be9d9..0bca141 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -13,7 +13,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.79.2.6 2010/02/21 13:23:13 dkf Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.79.2.7 2010/03/11 09:29:29 dkf Exp $
*/
#include "default.h"
@@ -4694,14 +4694,19 @@ DumpLine(
name = "insert";
} else if (segPtr == textPtr->currentMarkPtr) {
name = "current";
+ } else if (markPtr->hPtr == NULL) {
+ name = NULL;
+ lineChanged = 0;
} else {
name = Tcl_GetHashKey(&textPtr->sharedTextPtr->markTable,
markPtr->hPtr);
}
- TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr,
- lineno, offset, &index);
- lineChanged = DumpSegment(textPtr, interp, "mark", name,
- command, &index, what);
+ if (name != NULL) {
+ TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr,
+ lineno, offset, &index);
+ lineChanged = DumpSegment(textPtr, interp, "mark", name,
+ command, &index, what);
+ }
} else if ((what & TK_DUMP_TAG) &&
(segPtr->typePtr == &tkTextToggleOnType)) {
TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr,