Skip to content

Commit 4520999

Browse files
authored
polish for supporting markdown hybrid find in notebook search (microsoft#182776)
* fix default notebook search filters * save state on markdown preview toggle
1 parent 5d78100 commit 4520999

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/vs/workbench/contrib/search/browser/searchFindInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class SearchFindInput extends ContextScopedFindInput {
6363
// filter is checked if it's in a non-default state
6464
this._filterChecked =
6565
!this.filters.markupInput ||
66-
this.filters.markupPreview ||
66+
!this.filters.markupPreview ||
6767
!this.filters.codeInput ||
6868
!this.filters.codeOutput;
6969

src/vs/workbench/contrib/search/browser/searchView.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,13 +2010,15 @@ export class SearchView extends ViewPane {
20102010
const isInNotebookCellInput = this.searchWidget.getNotebookFilters().codeInput;
20112011
const isInNotebookCellOutput = this.searchWidget.getNotebookFilters().codeOutput;
20122012
const isInNotebookMarkdownInput = this.searchWidget.getNotebookFilters().markupInput;
2013+
const isInNotebookMarkdownPreview = this.searchWidget.getNotebookFilters().markupPreview;
20132014

20142015
this.viewletState['query.contentPattern'] = contentPattern;
20152016
this.viewletState['query.regex'] = isRegex;
20162017
this.viewletState['query.wholeWords'] = isWholeWords;
20172018
this.viewletState['query.caseSensitive'] = isCaseSensitive;
20182019

20192020
this.viewletState['query.isInNotebookMarkdownInput'] = isInNotebookMarkdownInput;
2021+
this.viewletState['query.isInNotebookMarkdownPreview'] = isInNotebookMarkdownPreview;
20202022
this.viewletState['query.isInNotebookCellInput'] = isInNotebookCellInput;
20212023
this.viewletState['query.isInNotebookCellOutput'] = isInNotebookCellOutput;
20222024
}

0 commit comments

Comments
 (0)