diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-28 11:34:38 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-28 11:34:38 (GMT) |
commit | 999562c37287db5357449856924deb4ec78cef1a (patch) | |
tree | c77a6ed7edb5a23bd4a582adbd6ba1ee58458708 /library | |
parent | 328e394531084d697d4dbf9296a253e8a10dee36 (diff) | |
parent | 64ef8f9af569b1fd6d2dc992851976042391fa72 (diff) | |
download | tk-999562c37287db5357449856924deb4ec78cef1a.zip tk-999562c37287db5357449856924deb4ec78cef1a.tar.gz tk-999562c37287db5357449856924deb4ec78cef1a.tar.bz2 |
Merge 8.7
Diffstat (limited to 'library')
-rw-r--r-- | library/entry.tcl | 9 | ||||
-rw-r--r-- | library/ttk/entry.tcl | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/library/entry.tcl b/library/entry.tcl index 2090fa7..bff426c 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -596,7 +596,8 @@ proc ::tk::EntryTranspose w { # start - Position at which to start search. proc ::tk::EntryNextWord {w start} { - if {[$w cget -show] ne ""} { + # the check on [winfo class] is because the spinbox also uses this proc + if {[winfo class $w] eq "Entry" && [$w cget -show] ne ""} { return end } set pos [tk::endOfWord [$w get] [$w index $start]] @@ -618,7 +619,8 @@ proc ::tk::EntryNextWord {w start} { # start - Position at which to start search. proc ::tk::EntrySelectNextWord {w start} { - if {[$w cget -show] ne ""} { + # the check on [winfo class] is because the spinbox also uses this proc + if {[winfo class $w] eq "Entry" && [$w cget -show] ne ""} { return end } set pos [tk::endOfWord [$w get] [$w index $start]] @@ -638,7 +640,8 @@ proc ::tk::EntrySelectNextWord {w start} { # start - Position at which to start search. proc ::tk::EntryPreviousWord {w start} { - if {[$w cget -show] ne ""} { + # the check on [winfo class] is because the spinbox also uses this proc + if {[winfo class $w] eq "Entry" && [$w cget -show] ne ""} { return 0 } set pos [tk::startOfPreviousWord [$w get] [$w index $start]] diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index b01e6a2..66b2efd 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -253,7 +253,8 @@ proc ttk::entry::See {w {index insert}} { # end-of-word position after a given position in the text. # proc ttk::entry::NextWord {w start} { - if {[$w cget -show] ne ""} { + # the check on [winfo class] is because the spinbox and combobox also use this proc + if {[winfo class $w] eq "TEntry" && [$w cget -show] ne ""} { return end } variable State @@ -272,7 +273,8 @@ proc ttk::entry::NextWord {w start} { # position in the text. # proc ttk::entry::SelectNextWord {w start} { - if {[$w cget -show] ne ""} { + # the check on [winfo class] is because the spinbox and combobox also use this proc + if {[winfo class $w] eq "TEntry" && [$w cget -show] ne ""} { return end } variable State @@ -286,7 +288,8 @@ proc ttk::entry::SelectNextWord {w start} { ## PrevWord -- Find the previous word position. # proc ttk::entry::PrevWord {w start} { - if {[$w cget -show] ne ""} { + # the check on [winfo class] is because the spinbox and combobox also use this proc + if {[winfo class $w] eq "TEntry" && [$w cget -show] ne ""} { return 0 } set pos [tk::startOfPreviousWord [$w get] [$w index $start]] |