diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2010-03-11 09:29:29 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2010-03-11 09:29:29 (GMT) |
commit | eef29d4690c8a49bd7caf607862dd4de0dfdf128 (patch) | |
tree | c13b3502f8c832acb8c65fd5e0986269a00f9bce /generic/tkText.c | |
parent | 2bec0a36f7cb2d1567a01353e8ce5fc973df6cfd (diff) | |
download | tk-eef29d4690c8a49bd7caf607862dd4de0dfdf128.zip tk-eef29d4690c8a49bd7caf607862dd4de0dfdf128.tar.gz tk-eef29d4690c8a49bd7caf607862dd4de0dfdf128.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.c | 15 |
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, |