Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | [Bug-3021557]: Moving the cursor in elided text freezes Tk |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
34eab8bf009af77fe16af810152925e4 |
User & Date: | jan.nijtmans 2012-01-19 19:53:34 |
Context
2012-01-22
| ||
16:12 | patch 3471873: mark next/prev with peer text widgets check-in: 570385c7 user: jan.nijtmans tags: trunk | |
2012-01-19
| ||
19:53 | [Bug-3021557]: Moving the cursor in elided text freezes Tk check-in: 34eab8bf user: jan.nijtmans tags: trunk | |
05:43 | [Bug-3021557]: Moving the cursor in elided text freezes Tk check-in: 32dd4021 user: jan.nijtmans tags: core-8-5-branch | |
2011-12-22
| ||
18:43 | 3235256 - Keep menu entry IDs out of system values. Thanks Colin McDonald. check-in: 6b6c9d82 user: dgp tags: trunk | |
Changes
Changes to ChangeLog.
1 2 3 4 5 6 7 | 2011-12-13 Donal K. Fellows <[email protected]> * doc/getOpenFile.n: Make example follow best practices. Issue spotted by Emiliano Gavilan. 2011-11-29 Donal K. Fellows <[email protected]> | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | 2012-01-19 Francois Vogel <[email protected]> * generic/tkText.c: [Bug-3021557]: Moving the cursor in * tests/text.test: elided text freezes Tk 2011-12-13 Donal K. Fellows <[email protected]> * doc/getOpenFile.n: Make example follow best practices. Issue spotted by Emiliano Gavilan. 2011-11-29 Donal K. Fellows <[email protected]> |
︙ | ︙ |
Changes to generic/tkText.c.
︙ | ︙ | |||
916 917 918 919 920 921 922 | index = *indexFromPtr; index.byteIndex = 0; /* * We're going to count up all display lines in the logical * line of 'indexFromPtr' up to, but not including the logical * line of 'indexToPtr', and then subtract off what we didn't | | < < < < | < < < | < | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | index = *indexFromPtr; index.byteIndex = 0; /* * We're going to count up all display lines in the logical * line of 'indexFromPtr' up to, but not including the logical * line of 'indexToPtr', and then subtract off what we didn't * want from 'from' and add on what we didn't count from 'to. */ while (index.linePtr != indexToPtr->linePtr) { value += TkTextUpdateOneLine(textPtr, fromPtr,0,&index,0); /* * We might have skipped past indexToPtr, if we have * multiple logical lines in a single display line. */ if (TkTextIndexCmp(&index,indexToPtr) > 0) { break; } } /* * Now we need to adjust the count to add on the number of * display lines in the last logical line, and subtract off * the number of display lines overcounted in the first |
︙ | ︙ |
Changes to tests/text.test.
︙ | ︙ | |||
2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 | .t insert end [string repeat "abcde " 50]\n .t insert end [string repeat "fghij " 50]\n .t insert end [string repeat "klmno " 50] .t count -lines -chars -indices -displaylines 1.0 end } -cleanup { destroy .t } -result {3 903 903 45} test text-11.1 {counting with tag priority eliding} -setup { text .t -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack append . .t {top expand fill} } -body { .t insert end "hello" | > > > > > > > > > > > > > > > > > > | 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 | .t insert end [string repeat "abcde " 50]\n .t insert end [string repeat "fghij " 50]\n .t insert end [string repeat "klmno " 50] .t count -lines -chars -indices -displaylines 1.0 end } -cleanup { destroy .t } -result {3 903 903 45} test text-10.39 {TextWidgetCmd procedure, "count" option} -setup { text .t pack .t update set res {} } -body { .t insert end "Line 1 - This is Line 1\n" .t insert end "Line 2 - This is Line 2\n" .t insert end "Line 3 - This is Line 3\n" .t insert end "Line 4 - This is Line 4\n" .t insert end "Line 5 - This is Line 5\n" lappend res [.t count -displaylines 1.19 3.24] [.t count -displaylines 1.0 end] .t tag add hidden 2.9 3.17 .t tag configure hidden -elide true lappend res [.t count -displaylines 1.19 3.24] [.t count -displaylines 1.0 end] } -cleanup { destroy .t } -result {2 6 2 5} test text-11.1 {counting with tag priority eliding} -setup { text .t -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack append . .t {top expand fill} } -body { .t insert end "hello" |
︙ | ︙ |