Kaydet (Commit) 32b069cf authored tarafından Tim Peters's avatar Tim Peters

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.
üst de02bcb2
...@@ -14,7 +14,13 @@ class CallTip: ...@@ -14,7 +14,13 @@ class CallTip:
self.x = self.y = 0 self.x = self.y = 0
def showtip(self, text): 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 self.text = text
if self.tipwindow or not self.text: if self.tipwindow or not self.text:
return return
self.widget.see("insert") self.widget.see("insert")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment