[Python-checkins] cpython (merge 3.5 -> default): Merge with 3.5
terry.reedy
python-checkins at python.org
Mon Sep 28 10:17:13 CEST 2015
https://hg.python.org/cpython/rev/ec3c6d4d6be9
changeset: 98349:ec3c6d4d6be9
parent: 98346:4d9b31b2a360
parent: 98348:2749f6b6f443
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Mon Sep 28 04:16:56 2015 -0400
summary:
Merge with 3.5
files:
Lib/idlelib/EditorWindow.py | 31 +------------------------
1 files changed, 1 insertions(+), 30 deletions(-)
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -317,36 +317,6 @@
self.askinteger = tkSimpleDialog.askinteger
self.showerror = tkMessageBox.showerror
- self._highlight_workaround() # Fix selection tags on Windows
-
- def _highlight_workaround(self):
- # On Windows, Tk removes painting of the selection
- # tags which is different behavior than on Linux and Mac.
- # See issue14146 for more information.
- if not sys.platform.startswith('win'):
- return
-
- text = self.text
- text.event_add("<<Highlight-FocusOut>>", "<FocusOut>")
- text.event_add("<<Highlight-FocusIn>>", "<FocusIn>")
- def highlight_fix(focus):
- sel_range = text.tag_ranges("sel")
- if sel_range:
- if focus == 'out':
- HILITE_CONFIG = idleConf.GetHighlight(
- idleConf.CurrentTheme(), 'hilite')
- text.tag_config("sel_fix", HILITE_CONFIG)
- text.tag_raise("sel_fix")
- text.tag_add("sel_fix", *sel_range)
- elif focus == 'in':
- text.tag_remove("sel_fix", "1.0", "end")
-
- text.bind("<<Highlight-FocusOut>>",
- lambda ev: highlight_fix("out"))
- text.bind("<<Highlight-FocusIn>>",
- lambda ev: highlight_fix("in"))
-
-
def _filename_to_unicode(self, filename):
"""Return filename as BMP unicode so diplayable in Tk."""
# Decode bytes to unicode.
@@ -785,6 +755,7 @@
insertbackground=cursor_color,
selectforeground=select_colors['foreground'],
selectbackground=select_colors['background'],
+ inactiveselectbackground=select_colors['background'],
)
IDENTCHARS = string.ascii_letters + string.digits + "_"
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list