提交 f1155025 编写于 作者: J Johannes Rieken

SuggestContext ignores 'lineContentAfter', fixes #4911

上级 58ab5ecd
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册