Created on 2019-07-09 17:44 by terry.reedy, last changed 2019-07-17 08:59 by taleinat. This issue is now closed.
Issue for Tal's PR 14675, dependency of #33610. 1. Only create CodeContext instances for "real" editors windows, but not e.g. shell or output windows. - Previously, were created but never activated because menu item deactivated. This is even better. 2. 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. 3. 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. 4. Use the editor window's getlineno() method where applicable. 5. Fix a bare except:.
PR 14030 for #17535 (line numbers) also has code for 1. I want to merge this first, and fix-up the other. Changing context font at the same time as the text font, instead of up to 1 second later, eliminates a visual glitch and is a user-visible improvement. Ditto for highlight changes, although the situation is more complicated due to text recoloring (a separate issue).
New changeset 7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2 by Tal Einat in branch 'master': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/7036e1de3a87d36c7ef41b8a2b44ed6fc4d34be2
New changeset bb79ab84c258566bcba89a87eb549fbc8643f882 by Miss Islington (bot) in branch '3.7': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/bb79ab84c258566bcba89a87eb549fbc8643f882
New changeset 6cf7c45cb5691b75d9a774c904df02a4f8bfcd04 by Miss Islington (bot) in branch '3.8': bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675) https://github.com/python/cpython/commit/6cf7c45cb5691b75d9a774c904df02a4f8bfcd04