summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2015-09-28 08:16:43 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2015-09-28 08:16:43 (GMT)
commit0b6e6e159191243c13e8ed51688016e878245ba0 (patch)
tree3191678dae5a4981b9e8e0a6be91a4f4058caa49 /Lib/idlelib
parent37e5d2c16410d9f6fa3c4ba02807221561c27d19 (diff)
parent507a5c4b4e8950dc4c688f151fc819160ee75873 (diff)
downloadcpython-0b6e6e159191243c13e8ed51688016e878245ba0.zip
cpython-0b6e6e159191243c13e8ed51688016e878245ba0.tar.gz
cpython-0b6e6e159191243c13e8ed51688016e878245ba0.tar.bz2
Merge with 3.4
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/EditorWindow.py31
1 files changed, 1 insertions, 30 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 74a4749..d742dd6 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -317,36 +317,6 @@ class EditorWindow(object):
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 @@ class EditorWindow(object):
insertbackground=cursor_color,
selectforeground=select_colors['foreground'],
selectbackground=select_colors['background'],
+ inactiveselectbackground=select_colors['background'],
)
IDENTCHARS = string.ascii_letters + string.digits + "_"