mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Don't hide suggest widget when expanding ghost text
This commit is contained in:
@@ -258,7 +258,7 @@ export class GhostTextWidget extends Disposable {
|
||||
button.className = 'button suggest-preview-text';
|
||||
button.append(`+${remainingLinesLength} lines…`);
|
||||
|
||||
disposableStore.add(dom.addStandardDisposableListener(button, 'click', (e) => {
|
||||
disposableStore.add(dom.addStandardDisposableListener(button, 'mousedown', (e) => {
|
||||
this.model?.setExpanded(true);
|
||||
e.preventDefault();
|
||||
this.editor.focus();
|
||||
|
||||
@@ -68,6 +68,11 @@ export class SuggestWidgetAdapterModel extends BaseGhostTextWidgetModel {
|
||||
}));
|
||||
}
|
||||
|
||||
public override setExpanded(expanded: boolean): void {
|
||||
super.setExpanded(expanded);
|
||||
this.updateFromSuggestion();
|
||||
}
|
||||
|
||||
private isSuggestionPreviewEnabled(): boolean {
|
||||
const suggestOptions = this.editor.getOption(EditorOption.suggest);
|
||||
return suggestOptions.showSuggestionPreview;
|
||||
|
||||
Reference in New Issue
Block a user