mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
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
This commit is contained in:
parent
bd26a4466b
commit
7036e1de3a
5 changed files with 139 additions and 98 deletions
|
|
@ -74,6 +74,8 @@ class OutputWindow(EditorWindow):
|
|||
("Go to file/line", "<<goto-file-line>>", None),
|
||||
]
|
||||
|
||||
allow_codecontext = False
|
||||
|
||||
def __init__(self, *args):
|
||||
EditorWindow.__init__(self, *args)
|
||||
self.text.bind("<<goto-file-line>>", self.goto_file_line)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue