summaryrefslogtreecommitdiffstats
path: root/tests/textDisp.test
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2005-10-31 23:21:08 (GMT)
committervincentdarley <vincentdarley>2005-10-31 23:21:08 (GMT)
commit37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c (patch)
tree7e2d82d19f36ec47285aae9c6546275a49512269 /tests/textDisp.test
parentcb95f825a841442bb3ecb6b8c20141a1b0d91fbd (diff)
downloadtk-37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c.zip
tk-37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c.tar.gz
tk-37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c.tar.bz2
fix for count displaylines bug
Diffstat (limited to 'tests/textDisp.test')
-rw-r--r--tests/textDisp.test27
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/textDisp.test b/tests/textDisp.test
index cd52fe0..b523e20 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: textDisp.test,v 1.38 2005/10/10 10:36:35 vincentdarley Exp $
+# RCS: @(#) $Id: textDisp.test,v 1.39 2005/10/31 23:21:08 vincentdarley Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -2603,6 +2603,31 @@ test textDisp-21.3 {TkTextPixelIndex, horizontal scrolling} {textfonts} {
.t xview scroll 2 units
list [.t index @-5,7] [.t index @5,7] [.t index @33,20]
} {1.2 1.2 2.6}
+test textDisp-21.4 {count -displaylines regression} {
+ set message {
+ QOTW: "C/C++, which is used by 16% of users, is the most popular programming language, but Tcl, used by 0%, seems to be the language of choice for the highest scoring users."
+(new line)
+Use the Up (cursor) key to scroll up one line at a time. At the second press, the cursor either gets locked or jumps several lines.
+
+Connect with Tkcon. The command
+.u count -displaylines \
+3.10 2.173
+should give answer -1; it gives me 5.
+
+Using 8.5a4 (ActiveState beta 4) under Linux. No problem with ActiveState beta 3.
+}
+
+toplevel .tt
+pack [text .tt.u] -side right
+.tt.u configure -width 30 -height 27 -wrap word -bg #FFFFFF
+.tt.u insert end $message
+.tt.u mark set insert 3.10
+tkwait visibility .tt.u
+set res [.tt.u count -displaylines 3.10 2.173]
+destroy .tt
+unset message
+set res
+} {-1}
.t delete 1.0 end
.t insert end "Line 1"