Skip to content

Commit

Permalink
SF bug 546078: IDLE calltips cause application error.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tim-one committed Apr 22, 2002
1 parent de02bcb commit 32b069c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tools/idle/CallTipWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ def __init__(self, widget):
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")
Expand Down

0 comments on commit 32b069c

Please sign in to comment.