diff --git a/src/vs/editor/contrib/suggest/common/suggestModel.ts b/src/vs/editor/contrib/suggest/common/suggestModel.ts index fca9bbc223e..fc522397f66 100644 --- a/src/vs/editor/contrib/suggest/common/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/common/suggestModel.ts @@ -37,7 +37,6 @@ export class Context { readonly isInEditableRange: boolean; readonly lineContentBefore: string; - readonly lineContentAfter: string; readonly wordBefore: string; readonly wordAfter: string; @@ -57,10 +56,8 @@ export class Context { this.lineNumber = position.lineNumber; this.column = position.column; this.lineContentBefore = lineContent.substr(0, position.column - 1); - this.lineContentAfter = lineContent.substr(position.column - 1); this.isInEditableRange = true; - if (model.hasEditableRange()) { const editableRange = model.getEditableRange(); @@ -101,7 +98,7 @@ export class Context { return true; } - if (!startsWith(context.lineContentBefore, this.lineContentBefore) || this.lineContentAfter !== context.lineContentAfter) { + if (!startsWith(context.lineContentBefore, this.lineContentBefore)) { // Line has changed before position return true; } @@ -115,7 +112,7 @@ export class Context { } shouldRetrigger(context: Context): boolean { - if (!startsWith(this.lineContentBefore, context.lineContentBefore) || this.lineContentAfter !== context.lineContentAfter) { + if (!startsWith(this.lineContentBefore, context.lineContentBefore)) { // Doesn't look like the same line return false; }