mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
ensure accept/discard always reveals the zone widget (#228327)
fixes https://github.com/microsoft/vscode-copilot/issues/7933
This commit is contained in:
@@ -169,6 +169,11 @@ export class InlineChatZoneWidget extends ZoneWidget {
|
||||
this._scrollUp.enable();
|
||||
}
|
||||
|
||||
reveal(position: Position) {
|
||||
this._scrollUp.reset();
|
||||
this.updatePositionAndHeight(position);
|
||||
}
|
||||
|
||||
override updatePositionAndHeight(position: Position): void {
|
||||
const revealZone = this._createZoneAndScrollRestoreFn(position);
|
||||
super.updatePositionAndHeight(position, this._computeHeight().linesValue);
|
||||
@@ -255,6 +260,10 @@ class ScrollUpState {
|
||||
this._listener.dispose();
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
this._didScrollUpOrDown = undefined;
|
||||
}
|
||||
|
||||
enable(): void {
|
||||
this._didScrollUpOrDown = undefined;
|
||||
this._listener.value = this._editor.onDidScrollChange(e => {
|
||||
|
||||
Reference in New Issue
Block a user