diff options
author | fvogel <fvogelnew1@free.fr> | 2023-08-02 08:38:41 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-08-02 08:38:41 (GMT) |
commit | aa8e8ef6479c292abe64ce658c26122b2401e723 (patch) | |
tree | aeef46dd8ca433e8bd596d39ae1249c9f497591c /library/entry.tcl | |
parent | dc8f78d70ead0c1720be266074a81ac0dbc9692b (diff) | |
parent | f01897a0e242ad0c2ec6781b3c87b54117bf2f26 (diff) | |
download | tk-aa8e8ef6479c292abe64ce658c26122b2401e723.zip tk-aa8e8ef6479c292abe64ce658c26122b2401e723.tar.gz tk-aa8e8ef6479c292abe64ce658c26122b2401e723.tar.bz2 |
Fix [2a32225cd1]: Entry widget allows navigating by word in masked password field.
Diffstat (limited to 'library/entry.tcl')
-rw-r--r-- | library/entry.tcl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/entry.tcl b/library/entry.tcl index 593daa6..e8f260b 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -599,6 +599,9 @@ proc ::tk::EntryTranspose w { if {[tk windowingsystem] eq "win32"} { proc ::tk::EntryNextWord {w start} { + if {[$w cget -show] ne ""} { + return end + } set pos [tk::endOfWord [$w get] [$w index $start]] if {$pos >= 0} { set pos [tk::startOfNextWord [$w get] $pos] @@ -610,6 +613,9 @@ if {[tk windowingsystem] eq "win32"} { } } else { proc ::tk::EntryNextWord {w start} { + if {[$w cget -show] ne ""} { + return end + } set pos [tk::endOfWord [$w get] [$w index $start]] if {$pos < 0} { return end @@ -628,6 +634,9 @@ if {[tk windowingsystem] eq "win32"} { # start - Position at which to start search. proc ::tk::EntryPreviousWord {w start} { + if {[$w cget -show] ne ""} { + return 0 + } set pos [tk::startOfPreviousWord [$w get] [$w index $start]] if {$pos < 0} { return 0 |