ensure accept/discard always reveals the zone widget (#228327)

fixes https://github.com/microsoft/vscode-copilot/issues/7933
This commit is contained in:
Johannes Rieken
2024-09-12 11:49:10 +02:00
committed by GitHub
parent 0bd94f8a4e
commit edbf964e42
2 changed files with 10 additions and 2 deletions

View File

@@ -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 => {