diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2002-09-15 21:43:13 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2002-09-15 21:43:13 (GMT) |
commit | e72f05d5fb5b36400a5470a8420bbed302029839 (patch) | |
tree | e1342c7597df27900b7137bd1d671bc8bfa3ede5 /Lib | |
parent | c209b3dab5a533ea0bfc2d2462a4553e4445db29 (diff) | |
download | cpython-e72f05d5fb5b36400a5470a8420bbed302029839.zip cpython-e72f05d5fb5b36400a5470a8420bbed302029839.tar.gz cpython-e72f05d5fb5b36400a5470a8420bbed302029839.tar.bz2 |
Merge Py Idle changes
Rev 1.4
SF bug 546078: IDLE calltips cause application error.
Assorted crashes on Windows and Linux when trying to display a very
long calltip, most likely a Tk bug. Wormed around by clamping the
calltip display to a maximum of 79 characters (why 79? why not ...).
Bugfix candidate, for all Python releases.
Rev 1.5
Remove unnecessary imports
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/idlelib/CallTipWindow.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py index d253fa5..24af6b0 100644 --- a/Lib/idlelib/CallTipWindow.py +++ b/Lib/idlelib/CallTipWindow.py @@ -2,7 +2,6 @@ # After ToolTip.py, which uses ideas gleaned from PySol # Used by the CallTips IDLE extension. -import os from Tkinter import * class CallTip: @@ -14,7 +13,13 @@ class CallTip: self.x = self.y = 0 def showtip(self, text): + # SF bug 546078: IDLE calltips cause application error. + # There were crashes on various Windows flavors, and even a + # crashing X server on Linux, with very long calltips. + if len(text) >= 79: + text = text[:75] + ' ...' self.text = text + if self.tipwindow or not self.text: return self.widget.see("insert") |