diff --git a/src/vs/editor/contrib/suggest/suggestMemory.ts b/src/vs/editor/contrib/suggest/suggestMemory.ts index 6351ea04471fb3606ff133c42407195c83cceb7f..5256dd4bce45f861e2c744638c6af2297fea04b0 100644 --- a/src/vs/editor/contrib/suggest/suggestMemory.ts +++ b/src/vs/editor/contrib/suggest/suggestMemory.ts @@ -58,7 +58,7 @@ export class LRUMemory extends Memory { this._cache.set(key, { touch: this._seq++, type: item.suggestion.type, - insertText: undefined + insertText: item.suggestion.insertText }); } @@ -74,7 +74,7 @@ export class LRUMemory extends Memory { const { suggestion } = items[i]; const key = `${model.getLanguageIdentifier().language}/${suggestion.label}`; 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; res = i; }