diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-30 09:58:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-30 09:58:25 (GMT) |
commit | 9d377d42451b27ab52f741aed2b59afa9ca8b27d (patch) | |
tree | db88dd5514a7ec52cc9fb37a431411f987a85aea /library/text.tcl | |
parent | 309e2d177f708125a52e88368079ee62b71be0ef (diff) | |
parent | 1ed6e3fd56d286fd7d7fc4a426cf223dbf1bb26b (diff) | |
download | tk-9d377d42451b27ab52f741aed2b59afa9ca8b27d.zip tk-9d377d42451b27ab52f741aed2b59afa9ca8b27d.tar.gz tk-9d377d42451b27ab52f741aed2b59afa9ca8b27d.tar.bz2 |
Merge 8.6
Diffstat (limited to 'library/text.tcl')
-rw-r--r-- | library/text.tcl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/text.tcl b/library/text.tcl index 62db560..6d3df8e 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -1278,7 +1278,11 @@ proc ::tk::TextUndoRedoProcessMarks {w} { set nUndoMarks [llength $undoMarks] set n [expr {$nUndoMarks / 2}] set undoMarks [lsort -dictionary $undoMarks] - set Lmarks [lrange $undoMarks 0 [expr {$n - 1}]] + if {$n > 0} { + set Lmarks [lrange $undoMarks 0 [expr {$n - 1}]] + } else { + set Lmarks {} + } set Rmarks [lrange $undoMarks $n [llength $undoMarks]] foreach Lmark $Lmarks Rmark $Rmarks { lappend indices [$w index $Lmark] [$w index $Rmark] |