summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-08-01 18:57:08 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-08-01 18:57:08 (GMT)
commit09a998f5c0e28d61b728927aa0ad605925dd0b73 (patch)
tree8fc2f97e69dc2daa35b45a05be08a4aadc17e168 /library/entry.tcl
parentb73818121224fd93837e8cf4da94de5e818a7098 (diff)
downloadtk-09a998f5c0e28d61b728927aa0ad605925dd0b73.zip
tk-09a998f5c0e28d61b728927aa0ad605925dd0b73.tar.gz
tk-09a998f5c0e28d61b728927aa0ad605925dd0b73.tar.bz2
Fix [2a32225cd1]: Entry widget allows navigating by word in masked password field. Patch from Emiliano Gavilan.
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 4140c92..e16fba4 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 [tcl_endOfWord [$w get] [$w index $start]]
if {$pos >= 0} {
set pos [tcl_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 [tcl_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 [tcl_startOfPreviousWord [$w get] [$w index $start]]
if {$pos < 0} {
return 0