Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32b069c

Browse files
committed
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.
1 parent de02bcb commit 32b069c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Tools/idle/CallTipWindow.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ def __init__(self, widget):
1414
self.x = self.y = 0
1515

1616
def showtip(self, text):
17+
# SF bug 546078: IDLE calltips cause application error.
18+
# There were crashes on various Windows flavors, and even a
19+
# crashing X server on Linux, with very long calltips.
20+
if len(text) >= 79:
21+
text = text[:75] + ' ...'
1722
self.text = text
23+
1824
if self.tipwindow or not self.text:
1925
return
2026
self.widget.see("insert")

0 commit comments

Comments
 (0)