diff options
author | dgp@users.sourceforge.net <dgp> | 2015-04-09 12:36:07 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2015-04-09 12:36:07 (GMT) |
commit | 333cbbe8ed60aea3d00d5c39a3b5bb1240fd2798 (patch) | |
tree | 28ab59c03c0f00588cbbb5f52ea5239d18015e12 | |
parent | b05a12cf415ffc85bfb91ba7e500f96de682348c (diff) | |
parent | f79e22d2b2953a58f9a5bfb6550c6cd938ad5c29 (diff) | |
download | tk-333cbbe8ed60aea3d00d5c39a3b5bb1240fd2798.zip tk-333cbbe8ed60aea3d00d5c39a3b5bb1240fd2798.tar.gz tk-333cbbe8ed60aea3d00d5c39a3b5bb1240fd2798.tar.bz2 |
[e4ed00a954] Fixed crash with display wordstart
-rw-r--r-- | generic/tkTextIndex.c | 2 | ||||
-rw-r--r-- | tests/textIndex.test | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 13f3957..b2919d5 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -2340,7 +2340,7 @@ StartEnd( int offset; if (modifier == TKINDEX_DISPLAY) { - TkTextIndexForwChars(NULL, indexPtr, 0, indexPtr, + TkTextIndexForwChars(textPtr, indexPtr, 0, indexPtr, COUNT_DISPLAY_INDICES); } diff --git a/tests/textIndex.test b/tests/textIndex.test index 28dc0df..92cbff0 100644 --- a/tests/textIndex.test +++ b/tests/textIndex.test @@ -905,6 +905,11 @@ test textIndex-22.12 {text index wordstart, unicode} { test textIndex-22.13 {text index wordstart, unicode} { text_test_word wordstart "\uc700\uc700 abc" 8 } 3 +test textIndex-22.15 {text index display wordstart} { + catch {destroy .t} + text .t + .t index "1.0 display wordstart" ; # used to crash +} 1.0 test textIndex-23.1 {text paragraph start} { pack [text .t2] |