summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-02-05 17:17:03 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-02-05 17:17:03 (GMT)
commite00820e69f4c9fe0fb91691c104ced37840a140d (patch)
tree25823cc797995137b819b9abb8f885934b2e038e
parent0691533b9281b179d99856732c3eb28f6a4256cf (diff)
parent161ab94f1c1e0e903cd217f89ff6981d9cd74923 (diff)
downloadtk-e00820e69f4c9fe0fb91691c104ced37840a140d.zip
tk-e00820e69f4c9fe0fb91691c104ced37840a140d.tar.gz
tk-e00820e69f4c9fe0fb91691c104ced37840a140d.tar.bz2
Fix [ae32eb7e10]: Win + specific text widget configuration : textDisp-18.6, -20.2 -20.3 -20.4 fail
-rw-r--r--generic/tkTextDisp.c2
-rw-r--r--tests/textDisp.test10
2 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 095bb5e..371e910 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -8793,7 +8793,7 @@ FinalizeBaseChunk(
#if TK_DRAW_IN_CONTEXT
newwidth = 0;
CharChunkMeasureChars(chunkPtr, NULL, 0, 0, -1, 0, -1, 0, &newwidth);
- if (newwidth != chunkPtr->width) {
+ if (newwidth < chunkPtr->width) {
widthAdjust += newwidth - chunkPtr->width;
chunkPtr->width = newwidth;
}
diff --git a/tests/textDisp.test b/tests/textDisp.test
index a3a4553..216f767 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -2873,28 +2873,28 @@ for {set i 2} {$i <= 200} {incr i} {
.t configure -wrap word
.t delete 50.0 51.0
.t insert 50.0 "This is a long line, one that will wrap around twice.\n"
-test textDisp-20.1 {FindDLine} {textfonts} {
+test textDisp-20.1 {FindDLine} {
.t yview 48.0
list [.t dlineinfo 46.0] [.t dlineinfo 47.0] [.t dlineinfo 49.0] \
[.t dlineinfo 58.0]
} [list {} {} [list 3 [expr {$fixedDiff + 16}] 49 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}]
-test textDisp-20.2 {FindDLine} {textfonts} {
+test textDisp-20.2 {FindDLine} {
.t yview 100.0
.t yview -pickplace 53.0
list [.t dlineinfo 50.0] [.t dlineinfo 50.14] [.t dlineinfo 50.21]
} [list [list 3 [expr {-1 - $fixedDiff/2}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {-1 - $fixedDiff/2}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {12 + $fixedDiff/2}] 133 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]]]
-test textDisp-20.3 {FindDLine} {textfonts} {
+test textDisp-20.3 {FindDLine} {
.t yview 100.0
.t yview 49.0
list [.t dlineinfo 50.0] [.t dlineinfo 50.24] [.t dlineinfo 57.0]
} [list [list 3 [expr {$fixedDiff + 16}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {2*$fixedDiff + 29}] 133 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}]
-test textDisp-20.4 {FindDLine} {textfonts} {
+test textDisp-20.4 {FindDLine} {
.t yview 100.0
.t yview 42.0
list [.t dlineinfo 50.0] [.t dlineinfo 50.24] [.t dlineinfo 50.40]
} [list [list 3 [expr {8*$fixedDiff + 107}] 140 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] [list 3 [expr {9*$fixedDiff + 120}] 133 [expr {$fixedDiff + 13}] [expr {$fixedDiff + 10}]] {}]
.t config -wrap none
-test textDisp-20.5 {FindDLine} {textfonts} {
+test textDisp-20.5 {FindDLine} {
.t yview 100.0
.t yview 48.0
list [.t dlineinfo 50.0] [.t dlineinfo 50.20] [.t dlineinfo 50.40]