mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Bug #1525817: Don't truncate short lines in IDLE's tool tips.
This commit is contained in:
parent
0c4a3b330d
commit
0b48303f28
2 changed files with 7 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue