summaryrefslogtreecommitdiffstats
path: root/Tools/idle/CallTipWindow.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-04-22 18:43:49 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-04-22 18:43:49 (GMT)
commit32b069cf546a30826bc4d458acf1c7facc112fda (patch)
tree39cc8affb66979710f3e31a6711605be986076b0 /Tools/idle/CallTipWindow.py
parentde02bcb2659af6acb1d44ba61c0bcf7b2d53a6ed (diff)
downloadcpython-32b069cf546a30826bc4d458acf1c7facc112fda.zip
cpython-32b069cf546a30826bc4d458acf1c7facc112fda.tar.gz
cpython-32b069cf546a30826bc4d458acf1c7facc112fda.tar.bz2
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.
Diffstat (limited to 'Tools/idle/CallTipWindow.py')
-rw-r--r--Tools/idle/CallTipWindow.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/idle/CallTipWindow.py b/Tools/idle/CallTipWindow.py
index d253fa5..db1e346 100644
--- a/Tools/idle/CallTipWindow.py
+++ b/Tools/idle/CallTipWindow.py
@@ -14,7 +14,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")