mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Don't hide suggest widget when expanding ghost text
This commit is contained in:
parent
ab80101db2
commit
1e446dfadf
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue