summaryrefslogtreecommitdiffstats
path: root/library/entry.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/entry.tcl')
-rw-r--r--library/entry.tcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 2c72fee..2aab934 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -278,7 +278,11 @@ bind Entry <<TkStartIMEMarkedText>> {
dict set ::tk::Priv(IMETextMark) "%W" [%W index insert]
}
bind Entry <<TkEndIMEMarkedText>> {
- %W selection range [dict get $::tk::Priv(IMETextMark) "%W"] insert
+ if { [catch {dict get $::tk::Priv(IMETextMark) "%W"} mark] } {
+ bell
+ } else {
+ %W selection range $mark insert
+ }
}
bind Entry <<TkClearIMEMarkedText>> {
%W delete [dict get $::tk::Priv(IMETextMark) "%W"] [%W index insert]