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

fix #44305

上级 4bb262df
...@@ -58,7 +58,7 @@ export class LRUMemory extends Memory { ...@@ -58,7 +58,7 @@ export class LRUMemory extends Memory {
this._cache.set(key, { this._cache.set(key, {
touch: this._seq++, touch: this._seq++,
type: item.suggestion.type, type: item.suggestion.type,
insertText: undefined insertText: item.suggestion.insertText
}); });
} }
...@@ -74,7 +74,7 @@ export class LRUMemory extends Memory { ...@@ -74,7 +74,7 @@ export class LRUMemory extends Memory {
const { suggestion } = items[i]; const { suggestion } = items[i];
const key = `${model.getLanguageIdentifier().language}/${suggestion.label}`; const key = `${model.getLanguageIdentifier().language}/${suggestion.label}`;
const item = this._cache.get(key); const item = this._cache.get(key);
if (item && item.touch > seq && item.type === suggestion.type) { if (item && item.touch > seq && item.type === suggestion.type && item.insertText === suggestion.insertText) {
seq = item.touch; seq = item.touch;
res = i; res = i;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册