From: Tim Peters Date: Mon, 22 Apr 2002 18:43:49 +0000 (+0000) Subject: SF bug 546078: IDLE calltips cause application error. X-Git-Tag: v2.3c1~5833 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32b069cf546a30826bc4d458acf1c7facc112fda;p=python 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. --- diff --git a/Tools/idle/CallTipWindow.py b/Tools/idle/CallTipWindow.py index d253fa5969..db1e346c55 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")