summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/EditorWindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r--Lib/idlelib/EditorWindow.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 5848c02..6e1d6f6 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -105,10 +105,18 @@ class EditorWindow(object):
self.text_frame = text_frame = Frame(top)
self.vbar = vbar = Scrollbar(text_frame, name='vbar')
self.width = idleConf.GetOption('main','EditorWindow','width')
- self.text = text = MultiCallCreator(Text)(
- text_frame, name='text', padx=5, wrap='none',
- width=self.width,
- height=idleConf.GetOption('main','EditorWindow','height') )
+ text_options = {
+ 'name': 'text',
+ 'padx': 5,
+ 'wrap': 'none',
+ 'width': self.width,
+ 'height': idleConf.GetOption('main', 'EditorWindow', 'height')}
+ if TkVersion >= 8.5:
+ # Starting with tk 8.5 we have to set the new tabstyle option
+ # to 'wordprocessor' to achieve the same display of tabs as in
+ # older tk versions.
+ text_options['tabstyle'] = 'wordprocessor'
+ self.text = text = MultiCallCreator(Text)(text_frame, **text_options)
self.top.focused_widget = self.text
self.createmenubar()