KEMBAR78
setting to anchor to focused cell by amunger · Pull Request #193833 · microsoft/vscode · GitHub
Skip to content

Conversation

@amunger
Copy link
Collaborator

@amunger amunger commented Sep 22, 2023

fixes #169038
fixes #193231

previously (in stable currently), the focused cell would be anchored only if the cell changing size was partially visible as shown in #193231. This will set the focused cell as anchored consistently by default, with a setting to disable that behavior.

Also changes the reveal full cell behavior back to revealing in the center, rather than pinning it to the bottom, which ended up focusing on the next cells output.

@vscodenpa vscodenpa added this to the September 2023 milestone Sep 22, 2023
// do not scroll the viewport if resized element is out of viewport
heightDiff = size - originalSize;
} else {
if (anchorIndex !== null && anchorIndex > index && anchorIndex <= lastRenderRange.end) {
Copy link
Collaborator Author

@amunger amunger Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a bug, the lastRenderRange.end is the index after the final visible index as documented in the indexAfter function, used by getRenderRange

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@amunger amunger merged commit 5601541 into main Sep 22, 2023
@amunger amunger deleted the aamunger/anchorFocusedCell branch September 22, 2023 19:50
@joaomoreno
Copy link
Member

Unsure if this broke scrolling further, please read #193231 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

notebook scrolls up incorrectly when adjusting output heights Scroll top improvement based on context

4 participants