Bug #1525817: Don't truncate short lines in IDLE's tool tips.
This commit is contained in:
parent
0c4a3b330d
commit
0b48303f28
|
@ -49,7 +49,11 @@ class CallTip:
|
|||
"""
|
||||
# truncate overly long calltip
|
||||
if len(text) >= 79:
|
||||
text = text[:75] + ' ...'
|
||||
textlines = text.splitlines()
|
||||
for i, line in enumerate(textlines):
|
||||
if len(line) > 79:
|
||||
textlines[i] = line[:75] + ' ...'
|
||||
text = '\n'.join(textlines)
|
||||
self.text = text
|
||||
if self.tipwindow or not self.text:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue