aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib-python/3/idlelib/CallTipWindow.py')
-rw-r--r--lib-python/3/idlelib/CallTipWindow.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib-python/3/idlelib/CallTipWindow.py b/lib-python/3/idlelib/CallTipWindow.py
index 27ed0859c8..8e29dabaea 100644
--- a/lib-python/3/idlelib/CallTipWindow.py
+++ b/lib-python/3/idlelib/CallTipWindow.py
@@ -22,6 +22,7 @@ class CallTip:
self.parenline = self.parencol = None
self.lastline = None
self.hideid = self.checkhideid = None
+ self.checkhide_after_id = None
def position_window(self):
"""Check if needs to reposition the window, and if so - do it."""
@@ -47,13 +48,7 @@ class CallTip:
def showtip(self, text, parenleft, parenright):
"""Show the calltip, bind events which will close it and reposition it.
"""
- # truncate overly long calltip
- if len(text) >= 79:
- textlines = text.splitlines()
- for i, line in enumerate(textlines):
- if len(line) > 79:
- textlines[i] = line[:75] + ' ...'
- text = '\n'.join(textlines)
+ # Only called in CallTips, where lines are truncated
self.text = text
if self.tipwindow or not self.text:
return
@@ -102,7 +97,10 @@ class CallTip:
self.hidetip()
else:
self.position_window()
- self.widget.after(CHECKHIDE_TIME, self.checkhide_event)
+ if self.checkhide_after_id is not None:
+ self.widget.after_cancel(self.checkhide_after_id)
+ self.checkhide_after_id = \
+ self.widget.after(CHECKHIDE_TIME, self.checkhide_event)
def hide_event(self, event):
if not self.tipwindow: