summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/editor.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index ab9c7e6..892b64b 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -1658,12 +1658,12 @@ def get_accelerator(keydefs, eventname):
def fixwordbreaks(root):
- # Make sure that Tk's double-click and next/previous word
- # operations use our definition of a word (i.e. an identifier)
+ # On Windows, tcl/tk breaks 'words' only on spaces, as in Command Prompt.
+ # We want Motif style everywhere. See #21474, msg218992 and followup.
tk = root.tk
tk.call('tcl_wordBreakAfter', 'a b', 0) # make sure word.tcl is loaded
- tk.call('set', 'tcl_wordchars', '[a-zA-Z0-9_]')
- tk.call('set', 'tcl_nonwordchars', '[^a-zA-Z0-9_]')
+ tk.call('set', 'tcl_wordchars', r'\w')
+ tk.call('set', 'tcl_nonwordchars', r'\W')
def _editor_window(parent): # htest #