Skip to content

Commit

Permalink
remove unused noAutoAccept property, #57093
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Oct 17, 2018
1 parent bc94252 commit cceb269
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/vs/editor/common/modes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,6 @@ export interface CompletionItem {
command?: Command;
/**@internal*/
noWhitespaceAdjust?: boolean;
/**@internal*/
noAutoAccept?: boolean;

/**@internal*/
_labelLow?: string;
Expand Down
1 change: 0 additions & 1 deletion src/vs/editor/common/services/editorSimpleWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ export abstract class BaseEditorSimpleWorker {
kind: CompletionItemKind.Text,
label: word,
insertText: word,
noAutoAccept: true,
range: { startLineNumber: position.lineNumber, startColumn: currentWord.startColumn, endLineNumber: position.lineNumber, endColumn: currentWord.endColumn }
});
}
Expand Down
1 change: 0 additions & 1 deletion src/vs/editor/contrib/suggest/suggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const Context = {
Visible: new RawContextKey<boolean>('suggestWidgetVisible', false),
MultipleSuggestions: new RawContextKey<boolean>('suggestWidgetMultipleSuggestions', false),
MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true),
AcceptOnKey: new RawContextKey<boolean>('suggestionSupportsAcceptOnKey', true),
AcceptSuggestionsOnEnter: new RawContextKey<boolean>('acceptSuggestionOnEnter', true)
};

Expand Down
6 changes: 0 additions & 6 deletions src/vs/editor/contrib/suggest/suggestWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<IComp

private suggestWidgetVisible: IContextKey<boolean>;
private suggestWidgetMultipleSuggestions: IContextKey<boolean>;
private suggestionSupportsAutoAccept: IContextKey<boolean>;

private readonly editorBlurTimeout = new TimeoutTimer();
private readonly showTimeout = new TimeoutTimer();
Expand Down Expand Up @@ -479,7 +478,6 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<IComp

this.suggestWidgetVisible = SuggestContext.Visible.bindTo(contextKeyService);
this.suggestWidgetMultipleSuggestions = SuggestContext.MultipleSuggestions.bindTo(contextKeyService);
this.suggestionSupportsAutoAccept = SuggestContext.AcceptOnKey.bindTo(contextKeyService);

this.editor.addContentWidget(this);
this.setState(State.Hidden);
Expand Down Expand Up @@ -590,9 +588,6 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<IComp
this.currentSuggestionDetails = null;
}


this.suggestionSupportsAutoAccept.set(!item.suggestion.noAutoAccept);

this.focusedItem = item;

this.list.reveal(index);
Expand Down Expand Up @@ -1085,7 +1080,6 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<IComp

dispose(): void {
this.state = null;
this.suggestionSupportsAutoAccept = null;
this.currentSuggestionDetails = null;
this.focusedItem = null;
this.element = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export class SnippetCompletion implements CompletionItem {
documentation: MarkdownString;
range: IRange;
sortText: string;
noAutoAccept: boolean;
kind: CompletionItemKind;
insertTextIsSnippet: true;

Expand All @@ -38,7 +37,6 @@ export class SnippetCompletion implements CompletionItem {
this.insertText = snippet.body;
this.range = range;
this.sortText = `${snippet.snippetSource === SnippetSource.Extension ? 'z' : 'a'}-${snippet.prefix}`;
this.noAutoAccept = true;
this.kind = CompletionItemKind.Snippet;
this.insertTextIsSnippet = true;
}
Expand Down

0 comments on commit cceb269

Please sign in to comment.