-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
setting to anchor to focused cell #193833
Conversation
@@ -528,7 +528,7 @@ export class ListView<T> implements IListView<T> { | |||
// do not scroll the viewport if resized element is out of viewport | |||
heightDiff = size - originalSize; | |||
} else { | |||
if (anchorIndex !== null && anchorIndex > index && anchorIndex <= lastRenderRange.end) { |
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.
this was a bug, the lastRenderRange.end is the index after the final visible index as documented in the indexAfter
function, used by getRenderRange
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.
Nice!
src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts
Outdated
Show resolved
Hide resolved
Unsure if this broke scrolling further, please read #193231 (comment) |
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.