Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lib/idlelib/NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Released on 2020-10-05?
======================================


bpo-38792: Close a shell calltip if a :exc:`KeyboardInterrupt`
or shell restart occurs. Patch by Zackery Spytz.

bpo-30780: Add remaining configdialog tests for buttons and
highlights and keys tabs.

Expand Down
4 changes: 2 additions & 2 deletions Lib/idlelib/calltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _make_tk_calltip_window(self):
# See __init__ for usage
return calltip_w.CalltipWindow(self.text)

def _remove_calltip_window(self, event=None):
def remove_calltip_window(self, event=None):
if self.active_calltip:
self.active_calltip.hidetip()
self.active_calltip = None
Expand All @@ -55,7 +55,7 @@ def refresh_calltip_event(self, event):
self.open_calltip(False)

def open_calltip(self, evalfuncs):
self._remove_calltip_window()
self.remove_calltip_window()

hp = HyperParser(self.editwin, "insert")
sur_paren = hp.get_surrounding_brackets('(')
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
text.bind("<<run-module>>", scriptbinding.run_module_event)
text.bind("<<run-custom>>", scriptbinding.run_custom_event)
text.bind("<<do-rstrip>>", self.Rstrip(self).do_rstrip)
ctip = self.Calltip(self)
self.ctip = ctip = self.Calltip(self)
text.bind("<<try-open-calltip>>", ctip.try_open_calltip_event)
#refresh-calltip must come after paren-closed to work right
text.bind("<<refresh-calltip>>", ctip.refresh_calltip_event)
Expand Down
1 change: 1 addition & 0 deletions Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ def resetoutput(self):
self.text.insert("end-1c", "\n")
self.text.mark_set("iomark", "end-1c")
self.set_line_and_column()
self.ctip.remove_calltip_window()

def write(self, s, tags=()):
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Close an IDLE shell calltip if a :exc:`KeyboardInterrupt`
or shell restart occurs. Patch by Zackery Spytz.