- Notifications
You must be signed in to change notification settings - Fork37k
Re-render sticky scroll when line numbers display mode is changed#210815
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
aiday-mar commentedApr 22, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@timorthi thank you for the PR. After looking at the code, I believe the cleanest way to solve this issue would be to refactor the code so that we have a method In this manner the readConfigurationChange method would reuse the readConfiguration method and would add additional logic on top in the form of rerendering the widget under specific conditions. The following check: Should also be placed in the readConfigurationChange method in that case. |
timorthi commentedApr 23, 2024
@aiday-mar Updated! |
timorthi commentedApr 23, 2024
@microsoft-github-policy-service agree |
aiday-mar commentedApr 23, 2024
Great thanks! |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#210814
This forces a re-render when the line numbers display mode is updated.
This also forces a
_readConfigurationcall when the display mode changes, as there is a listener registered in_readConfigurationthat ensures line numbers are updated as the cursor moves while in relative display mode.Video showing desired behavior after the changes in this PR. This video also shows smart relative lines enabled invscode-vim, which toggles between absolute and relative lines depending on whether you are in insert or normal mode:
fixed.mp4