提交 58305040 编写于 作者: R Rob Lourens 提交者: GitHub

Merge pull request #26888 from Microsoft/amqi/search-remove-text

Fix #26821 Memento
......@@ -903,23 +903,10 @@ export class SearchViewlet extends Viewlet {
const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive();
const contentPattern = this.searchWidget.searchInput.getValue();
const patternExcludes = this.inputPatternExclusions.getValue().trim();
const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern();
const patternIncludes = this.inputPatternIncludes.getValue().trim();
const includesUsePattern = this.inputPatternIncludes.isGlobPattern();
const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles();
const useExcludeSettings = this.inputPatternExclusions.useExcludeSettings();
// store memento
this.viewletSettings['query.contentPattern'] = contentPattern;
this.viewletSettings['query.regex'] = isRegex;
this.viewletSettings['query.wholeWords'] = isWholeWords;
this.viewletSettings['query.caseSensitive'] = isCaseSensitive;
this.viewletSettings['query.folderExclusions'] = patternExcludes;
this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern;
this.viewletSettings['query.folderIncludes'] = patternIncludes;
this.viewletSettings['query.includesUsePattern'] = includesUsePattern;
this.viewletSettings['query.useIgnoreFiles'] = useIgnoreFiles;
if (!rerunQuery) {
return;
}
......@@ -1348,6 +1335,32 @@ export class SearchViewlet extends Viewlet {
];
}
public shutdown(): void {
const isRegex = this.searchWidget.searchInput.getRegex();
const isWholeWords = this.searchWidget.searchInput.getWholeWords();
const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive();
const contentPattern = this.searchWidget.searchInput.getValue();
const patternExcludes = this.inputPatternExclusions.getValue().trim();
const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern();
const patternIncludes = this.inputPatternIncludes.getValue().trim();
const includesUsePattern = this.inputPatternIncludes.isGlobPattern();
const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles();
// store memento
this.viewletSettings['query.contentPattern'] = contentPattern;
this.viewletSettings['query.regex'] = isRegex;
this.viewletSettings['query.wholeWords'] = isWholeWords;
this.viewletSettings['query.caseSensitive'] = isCaseSensitive;
this.viewletSettings['query.folderExclusions'] = patternExcludes;
this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern;
this.viewletSettings['query.folderIncludes'] = patternIncludes;
this.viewletSettings['query.includesUsePattern'] = includesUsePattern;
this.viewletSettings['query.useIgnoreFiles'] = useIgnoreFiles;
this.viewletSettings['query.contentPattern'] = contentPattern;
super.shutdown();
}
public dispose(): void {
this.isDisposed = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册