From 7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2 Mon Sep 17 00:00:00 2001 From: Tal Einat Date: Wed, 17 Jul 2019 11:15:53 +0300 Subject: bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) * Only create CodeContext instances for "real" editors windows, but not e.g. shell or output windows. * Remove configuration update Tk event fired every second, by having the editor window ask its code context widget to update when necessary, i.e. upon font or highlighting updates. * When code context isn't being shown, avoid having a Tk event fired every 100ms to check whether the code context needs to be updated. * Use the editor window's getlineno() method where applicable. * Update font of the code context widget before the main text widget --- Lib/idlelib/outwin.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/idlelib/outwin.py') diff --git a/Lib/idlelib/outwin.py b/Lib/idlelib/outwin.py index ecc53ef019..38c59bdf9b 100644 --- a/Lib/idlelib/outwin.py +++ b/Lib/idlelib/outwin.py @@ -74,6 +74,8 @@ class OutputWindow(EditorWindow): ("Go to file/line", "<>", None), ] + allow_codecontext = False + def __init__(self, *args): EditorWindow.__init__(self, *args) self.text.bind("<>", self.goto_file_line) -- cgit v1.2.1