-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
bpo-33610: When toggling code-context on, immediately show the current context. #14821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-33610: When toggling code-context on, immediately show the current context. #14821
Conversation
This avoids a delay of up to 100ms and the accompanying visual artifact.
This is a partial solution. Open a file, such as editor.py. Scroll down to where there would be at least 2 line of context. 'Show Code Context'. Before: a double action; I believe a single blank line is opened and then after a deley, the context is expanded and filled in. After: the context is opened full size and filled in. Much better. To continue: 'Hide Code Context'. 'Show Code Context'. A 1 line blank context is shown. ........ Seconds later, nothing is changed. ... Until do something line scroll that triggers the context. Diagnosis. Hide is not restoring everything to where it was before the first Show. Nor is it putting CC into a 'hidden' state that is properly restored by 'Show'. I have not looked yet. The new line is likely part of a full solution and should be merged if we cannot do better before b3. |
@terryjreedy, I've pushed a fix for the issue of wrong context shown after toggling off and back on. This was actually an entirely separate issue. I've also added tests for both issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem fixed. There is an issue with flashing (window manager clearing an area before overwriting it) when CC is in 'add' mode, versus 'sub' mode. Another reason to force CC into 'sub' mode. Nothing I tried made a definite improvement, so I am merging now, so we can move on.
Thanks @taleinat for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
…ly (pythonGH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show. (cherry picked from commit e0a1f8f) Co-authored-by: Tal Einat <[email protected]>
GH-14846 is a backport of this pull request to the 3.8 branch. |
…ly (pythonGH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show. (cherry picked from commit e0a1f8f) Co-authored-by: Tal Einat <[email protected]>
GH-14847 is a backport of this pull request to the 3.7 branch. |
…ly (GH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show. (cherry picked from commit e0a1f8f) Co-authored-by: Tal Einat <[email protected]>
…ly (GH-14821) (#14846) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show. (cherry picked from commit e0a1f8f) Co-authored-by: Tal Einat <[email protected]>
…ly (pythonGH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show.
…ly (pythonGH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show.
…ly (pythonGH-14821) Eliminate delay of up to 100ms and accompanying visual artifact. Fix bug of never showing context when hide and show.
This avoids a delay of up to 100ms and the accompanying visual artifact.
https://bugs.python.org/issue33610