diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2009-04-04 20:38:52 +0000 |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2009-04-04 20:38:52 +0000 |
commit | 113f0e8926e010e078c4350139ad2aa6582546cf (patch) | |
tree | 39f9192714e2ec0515bb3f7f19bc20182da774d0 /Lib/idlelib/EditorWindow.py | |
parent | c6cac059e92c20d2128f17944ad487c02e0fa85e (diff) | |
download | cpython-git-113f0e8926e010e078c4350139ad2aa6582546cf.tar.gz |
Merged revisions 70723 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70723 | kurt.kaiser | 2009-03-30 12:22:00 -0400 (Mon, 30 Mar 2009) | 1 line
Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr to handle mixed space/tab properly. Issue 5120, patch by Guilherme Polo.
........
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 38ae7b60aa..cee7767d3b 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -107,10 +107,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() |