diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2006-07-25 09:53:12 (GMT) | 
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2006-07-25 09:53:12 (GMT) | 
| commit | 0b48303f28fa4846c713240c57501d5fa70436c7 (patch) | |
| tree | bb5687723d7640bc7ddb2d05db8ed075205630c2 /Lib/idlelib/CallTipWindow.py | |
| parent | 0c4a3b330d03097b729b115df236b37059585ed1 (diff) | |
| download | cpython-0b48303f28fa4846c713240c57501d5fa70436c7.zip cpython-0b48303f28fa4846c713240c57501d5fa70436c7.tar.gz cpython-0b48303f28fa4846c713240c57501d5fa70436c7.tar.bz2  | |
Bug #1525817: Don't truncate short lines in IDLE's tool tips.
Diffstat (limited to 'Lib/idlelib/CallTipWindow.py')
| -rw-r--r-- | Lib/idlelib/CallTipWindow.py | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py index afd4439..2223885 100644 --- a/Lib/idlelib/CallTipWindow.py +++ b/Lib/idlelib/CallTipWindow.py @@ -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  | 
