Skip to content

Commit

Permalink
Reposition suggest docs when editor resizes #27676
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jun 27, 2017
1 parent 69788e9 commit 1070a6a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/vs/editor/contrib/suggest/browser/suggestWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
}),
themeService.onThemeChange(t => this.onThemeChange(t)),
editor.onDidBlurEditorText(() => this.onEditorBlur()),
editor.onDidLayoutChange(() => this.onEditorLayoutChange()),
this.list.onSelectionChange(e => this.onListSelection(e)),
this.list.onFocusChange(e => this.onListFocus(e)),
this.editor.onDidChangeCursorSelection(() => this.onCursorSelectionChanged())
Expand Down Expand Up @@ -469,6 +470,12 @@ export class SuggestWidget implements IContentWidget, IDelegate<ICompletionItem>
});
}

private onEditorLayoutChange(): void {
if ((this.state === State.Open || this.state === State.Details) && this.expandDocsSettingFromStorage()) {
this.expandSideOrBelow();
}
}

private onListSelection(e: IListEvent<ICompletionItem>): void {
if (!e.elements.length) {
return;
Expand Down

0 comments on commit 1070a6a

Please sign in to comment.