@codingame/monaco-vscode-search-service-override 6.0.2 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-search-service-override",
3
- "version": "6.0.2",
3
+ "version": "7.0.0",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -29,6 +29,6 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "vscode": "npm:@codingame/monaco-vscode-api@6.0.2"
32
+ "vscode": "npm:@codingame/monaco-vscode-api@7.0.0"
33
33
  }
34
34
  }
@@ -22,7 +22,7 @@ import { registerContributions as registerContributions$1 } from './searchWidget
22
22
  import { SymbolsQuickAccessProvider } from 'vscode/vscode/vs/workbench/contrib/search/browser/symbolsQuickAccess';
23
23
  import '../common/searchHistoryService.js';
24
24
  import 'vscode/vscode/vs/workbench/contrib/search/browser/searchModel';
25
- import { VIEWLET_ID, VIEW_ID, SEARCH_EXCLUDE_CONFIG, SearchSortOrder, ViewMode } from 'vscode/vscode/vs/workbench/services/search/common/search';
25
+ import { VIEWLET_ID, VIEW_ID, SEARCH_EXCLUDE_CONFIG, DEFAULT_MAX_SEARCH_RESULTS, SearchSortOrder, ViewMode } from 'vscode/vscode/vs/workbench/services/search/common/search';
26
26
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
27
27
  import { assertType } from 'vscode/vscode/vs/base/common/types';
28
28
  import { getWorkspaceSymbols } from 'vscode/vscode/vs/workbench/contrib/search/common/search';
@@ -218,7 +218,8 @@ configurationRegistry.registerConfiguration({
218
218
  markdownDescription: ( localizeWithPath(
219
219
  _moduleId,
220
220
  21,
221
- "Controls whether to use your global gitignore file (for example, from `$HOME/.config/git/ignore`) when searching for files. Requires `#search.useIgnoreFiles#` to be enabled."
221
+ "Controls whether to use your global gitignore file (for example, from `$HOME/.config/git/ignore`) when searching for files. Requires {0} to be enabled.",
222
+ '`#search.useIgnoreFiles#`'
222
223
  )),
223
224
  default: false,
224
225
  scope: ConfigurationScope.RESOURCE
@@ -228,7 +229,8 @@ configurationRegistry.registerConfiguration({
228
229
  markdownDescription: ( localizeWithPath(
229
230
  _moduleId,
230
231
  22,
231
- "Controls whether to use `.gitignore` and `.ignore` files in parent directories when searching for files. Requires `#search.useIgnoreFiles#` to be enabled."
232
+ "Controls whether to use `.gitignore` and `.ignore` files in parent directories when searching for files. Requires {0} to be enabled.",
233
+ '`#search.useIgnoreFiles#`'
232
234
  )),
233
235
  default: false,
234
236
  scope: ConfigurationScope.RESOURCE
@@ -242,11 +244,20 @@ configurationRegistry.registerConfiguration({
242
244
  )),
243
245
  default: false
244
246
  },
247
+ 'search.ripgrep.maxThreads': {
248
+ type: 'number',
249
+ description: ( localizeWithPath(
250
+ _moduleId,
251
+ 24,
252
+ "Number of threads to use for searching. When set to 0, the engine automatically determines this value."
253
+ )),
254
+ default: 0
255
+ },
245
256
  'search.quickOpen.includeHistory': {
246
257
  type: 'boolean',
247
258
  description: ( localizeWithPath(
248
259
  _moduleId,
249
- 24,
260
+ 25,
250
261
  "Whether to include results from recently opened files in the file results for Quick Open."
251
262
  )),
252
263
  default: true
@@ -258,31 +269,31 @@ configurationRegistry.registerConfiguration({
258
269
  enumDescriptions: [
259
270
  ( localizeWithPath(
260
271
  _moduleId,
261
- 25,
272
+ 26,
262
273
  'History entries are sorted by relevance based on the filter value used. More relevant entries appear first.'
263
274
  )),
264
275
  ( localizeWithPath(
265
276
  _moduleId,
266
- 26,
277
+ 27,
267
278
  'History entries are sorted by recency. More recently opened entries appear first.'
268
279
  ))
269
280
  ],
270
281
  description: ( localizeWithPath(
271
282
  _moduleId,
272
- 27,
283
+ 28,
273
284
  "Controls sorting order of editor history in quick open when filtering."
274
285
  ))
275
286
  },
276
287
  'search.followSymlinks': {
277
288
  type: 'boolean',
278
- description: ( localizeWithPath(_moduleId, 28, "Controls whether to follow symlinks while searching.")),
289
+ description: ( localizeWithPath(_moduleId, 29, "Controls whether to follow symlinks while searching.")),
279
290
  default: true
280
291
  },
281
292
  'search.smartCase': {
282
293
  type: 'boolean',
283
294
  description: ( localizeWithPath(
284
295
  _moduleId,
285
- 29,
296
+ 30,
286
297
  "Search case-insensitively if the pattern is all lowercase, otherwise, search case-sensitively."
287
298
  )),
288
299
  default: false
@@ -292,7 +303,7 @@ configurationRegistry.registerConfiguration({
292
303
  default: false,
293
304
  description: ( localizeWithPath(
294
305
  _moduleId,
295
- 30,
306
+ 31,
296
307
  "Controls whether the search view should read or modify the shared find clipboard on macOS."
297
308
  )),
298
309
  included: isMacintosh
@@ -303,21 +314,21 @@ configurationRegistry.registerConfiguration({
303
314
  default: 'sidebar',
304
315
  description: ( localizeWithPath(
305
316
  _moduleId,
306
- 31,
317
+ 32,
307
318
  "Controls whether the search will be shown as a view in the sidebar or as a panel in the panel area for more horizontal space."
308
319
  )),
309
320
  deprecationMessage: ( localizeWithPath(
310
321
  _moduleId,
311
- 32,
322
+ 33,
312
323
  "This setting is deprecated. You can drag the search icon to a new location instead."
313
324
  ))
314
325
  },
315
326
  'search.maxResults': {
316
327
  type: ['number', 'null'],
317
- default: 20000,
328
+ default: DEFAULT_MAX_SEARCH_RESULTS,
318
329
  markdownDescription: ( localizeWithPath(
319
330
  _moduleId,
320
- 33,
331
+ 34,
321
332
  "Controls the maximum number of search results, this can be set to `null` (empty) to return unlimited results."
322
333
  ))
323
334
  },
@@ -327,7 +338,7 @@ configurationRegistry.registerConfiguration({
327
338
  enumDescriptions: [
328
339
  ( localizeWithPath(
329
340
  _moduleId,
330
- 34,
341
+ 35,
331
342
  "Files with less than 10 results are expanded. Others are collapsed."
332
343
  )),
333
344
  '',
@@ -336,7 +347,7 @@ configurationRegistry.registerConfiguration({
336
347
  default: 'alwaysExpand',
337
348
  description: ( localizeWithPath(
338
349
  _moduleId,
339
- 35,
350
+ 36,
340
351
  "Controls whether the search results will be collapsed or expanded."
341
352
  )),
342
353
  },
@@ -345,26 +356,26 @@ configurationRegistry.registerConfiguration({
345
356
  default: true,
346
357
  description: ( localizeWithPath(
347
358
  _moduleId,
348
- 36,
359
+ 37,
349
360
  "Controls whether to open Replace Preview when selecting or replacing a match."
350
361
  )),
351
362
  },
352
363
  'search.showLineNumbers': {
353
364
  type: 'boolean',
354
365
  default: false,
355
- description: ( localizeWithPath(_moduleId, 37, "Controls whether to show line numbers for search results.")),
366
+ description: ( localizeWithPath(_moduleId, 38, "Controls whether to show line numbers for search results.")),
356
367
  },
357
368
  'search.usePCRE2': {
358
369
  type: 'boolean',
359
370
  default: false,
360
371
  description: ( localizeWithPath(
361
372
  _moduleId,
362
- 38,
373
+ 39,
363
374
  "Whether to use the PCRE2 regex engine in text search. This enables using some advanced regex features like lookahead and backreferences. However, not all PCRE2 features are supported - only features that are also supported by JavaScript."
364
375
  )),
365
376
  deprecationMessage: ( localizeWithPath(
366
377
  _moduleId,
367
- 39,
378
+ 40,
368
379
  "Deprecated. PCRE2 will be used automatically when using regex features that are only supported by PCRE2."
369
380
  )),
370
381
  },
@@ -374,29 +385,29 @@ configurationRegistry.registerConfiguration({
374
385
  enumDescriptions: [
375
386
  ( localizeWithPath(
376
387
  _moduleId,
377
- 40,
388
+ 41,
378
389
  "Position the actionbar to the right when the search view is narrow, and immediately after the content when the search view is wide."
379
390
  )),
380
- ( localizeWithPath(_moduleId, 41, "Always position the actionbar to the right.")),
391
+ ( localizeWithPath(_moduleId, 42, "Always position the actionbar to the right.")),
381
392
  ],
382
393
  default: 'right',
383
394
  description: ( localizeWithPath(
384
395
  _moduleId,
385
- 42,
396
+ 43,
386
397
  "Controls the positioning of the actionbar on rows in the search view."
387
398
  ))
388
399
  },
389
400
  'search.searchOnType': {
390
401
  type: 'boolean',
391
402
  default: true,
392
- description: ( localizeWithPath(_moduleId, 43, "Search all files as you type."))
403
+ description: ( localizeWithPath(_moduleId, 44, "Search all files as you type."))
393
404
  },
394
405
  'search.seedWithNearestWord': {
395
406
  type: 'boolean',
396
407
  default: false,
397
408
  description: ( localizeWithPath(
398
409
  _moduleId,
399
- 44,
410
+ 45,
400
411
  "Enable seeding search from the word nearest the cursor when the active editor has no selection."
401
412
  ))
402
413
  },
@@ -405,7 +416,7 @@ configurationRegistry.registerConfiguration({
405
416
  default: false,
406
417
  markdownDescription: ( localizeWithPath(
407
418
  _moduleId,
408
- 45,
419
+ 46,
409
420
  "Update the search query to the editor's selected text when focusing the search view. This happens either on click or when triggering the `workbench.views.search.focus` command."
410
421
  ))
411
422
  },
@@ -414,7 +425,7 @@ configurationRegistry.registerConfiguration({
414
425
  default: 300,
415
426
  markdownDescription: ( localizeWithPath(
416
427
  _moduleId,
417
- 46,
428
+ 47,
418
429
  "When {0} is enabled, controls the timeout in milliseconds between a character being typed and the search starting. Has no effect when {0} is disabled.",
419
430
  '`#search.searchOnType#`'
420
431
  ))
@@ -424,21 +435,21 @@ configurationRegistry.registerConfiguration({
424
435
  enum: ['selectWord', 'goToLocation', 'openLocationToSide'],
425
436
  default: 'goToLocation',
426
437
  enumDescriptions: [
427
- ( localizeWithPath(_moduleId, 47, "Double-clicking selects the word under the cursor.")),
438
+ ( localizeWithPath(_moduleId, 48, "Double-clicking selects the word under the cursor.")),
428
439
  ( localizeWithPath(
429
440
  _moduleId,
430
- 48,
441
+ 49,
431
442
  "Double-clicking opens the result in the active editor group."
432
443
  )),
433
444
  ( localizeWithPath(
434
445
  _moduleId,
435
- 49,
446
+ 50,
436
447
  "Double-clicking opens the result in the editor group to the side, creating one if it does not yet exist."
437
448
  )),
438
449
  ],
439
450
  markdownDescription: ( localizeWithPath(
440
451
  _moduleId,
441
- 50,
452
+ 51,
442
453
  "Configure effect of double-clicking a result in a search editor."
443
454
  ))
444
455
  },
@@ -447,12 +458,12 @@ configurationRegistry.registerConfiguration({
447
458
  enum: ['default', 'peekDefinition',],
448
459
  default: 'default',
449
460
  enumDescriptions: [
450
- ( localizeWithPath(_moduleId, 51, "Single-clicking does nothing.")),
451
- ( localizeWithPath(_moduleId, 52, "Single-clicking opens a Peek Definition window.")),
461
+ ( localizeWithPath(_moduleId, 52, "Single-clicking does nothing.")),
462
+ ( localizeWithPath(_moduleId, 53, "Single-clicking opens a Peek Definition window.")),
452
463
  ],
453
464
  markdownDescription: ( localizeWithPath(
454
465
  _moduleId,
455
- 53,
466
+ 54,
456
467
  "Configure effect of single-clicking a result in a search editor."
457
468
  ))
458
469
  },
@@ -461,7 +472,7 @@ configurationRegistry.registerConfiguration({
461
472
  default: false,
462
473
  markdownDescription: ( localizeWithPath(
463
474
  _moduleId,
464
- 54,
475
+ 55,
465
476
  "When enabled, new Search Editors will reuse the includes, excludes, and flags of the previously opened Search Editor."
466
477
  ))
467
478
  },
@@ -470,7 +481,7 @@ configurationRegistry.registerConfiguration({
470
481
  default: 1,
471
482
  markdownDescription: ( localizeWithPath(
472
483
  _moduleId,
473
- 55,
484
+ 56,
474
485
  "The default number of surrounding context lines to use when creating new Search Editors. If using `#search.searchEditor.reusePriorSearchConfiguration#`, this can be set to `null` (empty) to use the prior Search Editor's configuration."
475
486
  ))
476
487
  },
@@ -481,38 +492,38 @@ configurationRegistry.registerConfiguration({
481
492
  enumDescriptions: [
482
493
  ( localizeWithPath(
483
494
  _moduleId,
484
- 56,
495
+ 57,
485
496
  "Results are sorted by folder and file names, in alphabetical order."
486
497
  )),
487
498
  ( localizeWithPath(
488
499
  _moduleId,
489
- 57,
500
+ 58,
490
501
  "Results are sorted by file names ignoring folder order, in alphabetical order."
491
502
  )),
492
503
  ( localizeWithPath(
493
504
  _moduleId,
494
- 58,
505
+ 59,
495
506
  "Results are sorted by file extensions, in alphabetical order."
496
507
  )),
497
508
  ( localizeWithPath(
498
509
  _moduleId,
499
- 59,
510
+ 60,
500
511
  "Results are sorted by file last modified date, in descending order."
501
512
  )),
502
513
  ( localizeWithPath(
503
514
  _moduleId,
504
- 60,
515
+ 61,
505
516
  "Results are sorted by count per file, in descending order."
506
517
  )),
507
- ( localizeWithPath(_moduleId, 61, "Results are sorted by count per file, in ascending order."))
518
+ ( localizeWithPath(_moduleId, 62, "Results are sorted by count per file, in ascending order."))
508
519
  ],
509
- description: ( localizeWithPath(_moduleId, 62, "Controls sorting order of search results."))
520
+ description: ( localizeWithPath(_moduleId, 63, "Controls sorting order of search results."))
510
521
  },
511
522
  'search.decorations.colors': {
512
523
  type: 'boolean',
513
524
  description: ( localizeWithPath(
514
525
  _moduleId,
515
- 63,
526
+ 64,
516
527
  "Controls whether search file decorations should use colors."
517
528
  )),
518
529
  default: true
@@ -521,7 +532,7 @@ configurationRegistry.registerConfiguration({
521
532
  type: 'boolean',
522
533
  description: ( localizeWithPath(
523
534
  _moduleId,
524
- 64,
535
+ 65,
525
536
  "Controls whether search file decorations should use badges."
526
537
  )),
527
538
  default: true
@@ -531,16 +542,16 @@ configurationRegistry.registerConfiguration({
531
542
  enum: [ViewMode.Tree, ViewMode.List],
532
543
  default: ViewMode.List,
533
544
  enumDescriptions: [
534
- ( localizeWithPath(_moduleId, 65, "Shows search results as a tree.")),
535
- ( localizeWithPath(_moduleId, 66, "Shows search results as a list."))
545
+ ( localizeWithPath(_moduleId, 66, "Shows search results as a tree.")),
546
+ ( localizeWithPath(_moduleId, 67, "Shows search results as a list."))
536
547
  ],
537
- description: ( localizeWithPath(_moduleId, 67, "Controls the default search result view mode."))
548
+ description: ( localizeWithPath(_moduleId, 68, "Controls the default search result view mode."))
538
549
  },
539
550
  'search.quickAccess.preserveInput': {
540
551
  type: 'boolean',
541
552
  description: ( localizeWithPath(
542
553
  _moduleId,
543
- 68,
554
+ 69,
544
555
  "Controls whether the last typed input to Quick Search should be restored when opening it the next time."
545
556
  )),
546
557
  default: false
@@ -549,7 +560,7 @@ configurationRegistry.registerConfiguration({
549
560
  type: 'boolean',
550
561
  description: ( localizeWithPath(
551
562
  _moduleId,
552
- 69,
563
+ 70,
553
564
  "Show notebook editor rich content results for closed notebooks. Please refresh your search results after changing this setting."
554
565
  )),
555
566
  default: false
@@ -83,7 +83,7 @@ let FolderMatchRenderer = class FolderMatchRenderer extends Disposable {
83
83
  SearchContext.MatchFocusKey.bindTo(contextKeyServiceMain).set(false);
84
84
  SearchContext.FileFocusKey.bindTo(contextKeyServiceMain).set(false);
85
85
  SearchContext.FolderFocusKey.bindTo(contextKeyServiceMain).set(true);
86
- const instantiationService = this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, contextKeyServiceMain]))));
86
+ const instantiationService = this._register(this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, contextKeyServiceMain])))));
87
87
  const actions = disposables.add(instantiationService.createInstance(MenuWorkbenchToolBar, actionBarContainer, MenuId.SearchActionMenu, {
88
88
  menuOptions: {
89
89
  shouldForwardArgs: true
@@ -286,7 +286,7 @@ let MatchRenderer = class MatchRenderer extends Disposable {
286
286
  templateData.replace.textContent = replace ? match.replaceString : '';
287
287
  templateData.after.textContent = preview.after;
288
288
  const title = (preview.fullBefore + (replace ? match.replaceString : preview.inside) + preview.after).trim().substr(0, 999);
289
- templateData.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), templateData.parent, title));
289
+ templateData.disposables.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), templateData.parent, title));
290
290
  SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!(match instanceof MatchInNotebook && match.isReadonly()));
291
291
  const numLines = match.range().endLineNumber - match.range().startLineNumber;
292
292
  const extraLinesStr = numLines > 0 ? `+${numLines}` : '';
@@ -294,7 +294,7 @@ let MatchRenderer = class MatchRenderer extends Disposable {
294
294
  const lineNumberStr = showLineNumbers ? `${match.range().startLineNumber}:` : '';
295
295
  templateData.lineNumber.classList.toggle('show', (numLines > 0) || showLineNumbers);
296
296
  templateData.lineNumber.textContent = lineNumberStr + extraLinesStr;
297
- templateData.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), templateData.lineNumber, this.getMatchTitle(match, showLineNumbers)));
297
+ templateData.disposables.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), templateData.lineNumber, this.getMatchTitle(match, showLineNumbers)));
298
298
  templateData.actions.context = { viewer: this.searchView.getControl(), element: match };
299
299
  }
300
300
  disposeTemplate(templateData) {
@@ -118,6 +118,8 @@ let SearchView = class SearchView extends ViewPane {
118
118
  this.currentSearchQ = Promise.resolve();
119
119
  this.pauseSearching = false;
120
120
  this._visibleMatches = 0;
121
+ this._stashedQueryDetailsVisibility = undefined;
122
+ this._stashedReplaceVisibility = undefined;
121
123
  this.container = $$1('.search-view');
122
124
  this.viewletVisible = SearchContext.SearchViewVisibleKey.bindTo(this.contextKeyService);
123
125
  this.firstMatchFocused = SearchContext.FirstMatchFocusKey.bindTo(this.contextKeyService);
@@ -148,7 +150,7 @@ let SearchView = class SearchView extends ViewPane {
148
150
  this.inputPatternIncludesFocused = SearchContext.PatternIncludesFocusedKey.bindTo(this.contextKeyService);
149
151
  this.inputPatternExclusionsFocused = SearchContext.PatternExcludesFocusedKey.bindTo(this.contextKeyService);
150
152
  this.isEditableItem = SearchContext.IsEditableItemKey.bindTo(this.contextKeyService);
151
- this.instantiationService = this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, this.contextKeyService]))));
153
+ this.instantiationService = this._register(this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, this.contextKeyService])))));
152
154
  this._register(this.configurationService.onDidChangeConfiguration(e => {
153
155
  if (e.affectsConfiguration('search.sortOrder')) {
154
156
  if (this.searchConfig.sortOrder === SearchSortOrder.Modified) {
@@ -219,6 +221,24 @@ let SearchView = class SearchView extends ViewPane {
219
221
  if (visible === this.aiResultsVisible) {
220
222
  return;
221
223
  }
224
+ if (visible) {
225
+ this._stashedQueryDetailsVisibility = this._queryDetailsHidden();
226
+ this._stashedReplaceVisibility = this.searchWidget.isReplaceShown();
227
+ this.searchWidget.toggleReplace(false);
228
+ this.toggleQueryDetailsButton.style.display = 'none';
229
+ this.searchWidget.replaceButtonVisibility = false;
230
+ this.toggleQueryDetails(undefined, false);
231
+ }
232
+ else {
233
+ this.toggleQueryDetailsButton.style.display = '';
234
+ this.searchWidget.replaceButtonVisibility = true;
235
+ if (this._stashedReplaceVisibility) {
236
+ this.searchWidget.toggleReplace(this._stashedReplaceVisibility);
237
+ }
238
+ if (this._stashedQueryDetailsVisibility) {
239
+ this.toggleQueryDetails(undefined, this._stashedQueryDetailsVisibility);
240
+ }
241
+ }
222
242
  this.aiResultsVisible = visible;
223
243
  if (this.viewModel.searchResult.isEmpty()) {
224
244
  return;
@@ -227,9 +247,6 @@ let SearchView = class SearchView extends ViewPane {
227
247
  if (visible) {
228
248
  await this.model.addAIResults();
229
249
  }
230
- else {
231
- this.searchWidget.toggleReplace(false);
232
- }
233
250
  this.onSearchResultsChanged();
234
251
  this.onSearchComplete(() => { }, undefined, undefined, this.viewModel.searchResult.getCachedSearchComplete(visible));
235
252
  }
@@ -323,7 +340,7 @@ let SearchView = class SearchView extends ViewPane {
323
340
  this.viewletState['query.useExcludesAndIgnoreFiles'] : true;
324
341
  this.queryDetails = append(this.searchWidgetsContainerElement, $('.query-details'));
325
342
  this.toggleQueryDetailsButton = append(this.queryDetails, $('.more' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button' }));
326
- this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 1, "Toggle Search Details"))));
343
+ this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 1, "Toggle Search Details"))));
327
344
  this._register(addDisposableListener(this.toggleQueryDetailsButton, EventType.CLICK, e => {
328
345
  EventHelper.stop(e);
329
346
  this.toggleQueryDetails(!this.accessibilityService.isScreenReaderOptimized());
@@ -1295,6 +1312,9 @@ let SearchView = class SearchView extends ViewPane {
1295
1312
  this.reLayout();
1296
1313
  }
1297
1314
  }
1315
+ _queryDetailsHidden() {
1316
+ return this.queryDetails.classList.contains('more');
1317
+ }
1298
1318
  searchInFolders(folderPaths = []) {
1299
1319
  this._searchWithIncludeOrExclude(true, folderPaths);
1300
1320
  }
@@ -1983,7 +2003,7 @@ class SearchLinkButton extends Disposable {
1983
2003
  constructor(label, handler, hoverService, tooltip) {
1984
2004
  super();
1985
2005
  this.element = $('a.pointer', { tabindex: 0 }, label);
1986
- this._register(hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.element, tooltip));
2006
+ this._register(hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), this.element, tooltip));
1987
2007
  this.addEventHandlers(handler);
1988
2008
  }
1989
2009
  addEventHandlers(handler) {
@@ -1,4 +1,5 @@
1
1
  import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
+ import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
3
  import { append, $, trackFocus } from 'vscode/vscode/vs/base/browser/dom';
3
4
  import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
4
5
  import { Button } from 'vscode/vscode/vs/base/browser/ui/button/button';
@@ -9,7 +10,6 @@ import { Delayer } from 'vscode/vscode/vs/base/common/async';
9
10
  import { Emitter } from 'vscode/vscode/vs/base/common/event';
10
11
  import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
11
12
  import { CONTEXT_FIND_WIDGET_NOT_VISIBLE } from 'vscode/vscode/vs/editor/contrib/find/browser/findModel';
12
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
13
13
  import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
14
14
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
15
15
  import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
@@ -37,6 +37,7 @@ import { GroupModelChangeKind } from 'vscode/vscode/vs/workbench/common/editor';
37
37
  import { SearchFindInput } from './searchFindInput.js';
38
38
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
39
39
  import { MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
40
+ import { NotebookFindScopeType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
40
41
 
41
42
  var SearchWidget_1;
42
43
  const _moduleId = "vs/workbench/contrib/search/browser/searchWidget";
@@ -128,8 +129,7 @@ let SearchWidget = class SearchWidget extends Widget {
128
129
  notebookOptions.isInNotebookMarkdownPreview,
129
130
  notebookOptions.isInNotebookCellInput,
130
131
  notebookOptions.isInNotebookCellOutput,
131
- false,
132
- []
132
+ { findScopeType: NotebookFindScopeType.None }
133
133
  ))));
134
134
  this._register(this._notebookFilters.onDidChange(() => {
135
135
  if (this.searchInput) {
@@ -248,6 +248,11 @@ let SearchWidget = class SearchWidget extends Widget {
248
248
  focusRegexAction() {
249
249
  this.searchInput?.focusOnRegex();
250
250
  }
251
+ set replaceButtonVisibility(val) {
252
+ if (this.toggleReplaceButton) {
253
+ this.toggleReplaceButton.element.style.display = val ? '' : 'none';
254
+ }
255
+ }
251
256
  render(container, options) {
252
257
  this.domNode = append(container, $('.search-widget'));
253
258
  this.domNode.style.position = 'relative';
@@ -400,7 +405,7 @@ let SearchWidget = class SearchWidget extends Widget {
400
405
  }
401
406
  }
402
407
  }));
403
- this.replaceInput.onKeyDown((keyboardEvent) => this.onReplaceInputKeyDown(keyboardEvent));
408
+ this._register(this.replaceInput.onKeyDown((keyboardEvent) => this.onReplaceInputKeyDown(keyboardEvent)));
404
409
  this.replaceInput.setValue(options.replaceValue || '');
405
410
  this._register(this.replaceInput.inputBox.onDidChange(() => this._onReplaceValueChanged.fire()));
406
411
  this._register(this.replaceInput.inputBox.onDidHeightChange(() => this._onDidHeightChange.fire()));
@@ -519,6 +524,23 @@ let SearchWidget = class SearchWidget extends Widget {
519
524
  else if (keyboardEvent.equals(KeyCode.DownArrow)) {
520
525
  stopPropagationForMultiLineDownwards(keyboardEvent, this.searchInput?.getValue() ?? '', this.searchInput?.domNode.querySelector('textarea') ?? null);
521
526
  }
527
+ else if (keyboardEvent.equals(KeyCode.PageUp)) {
528
+ const inputElement = this.searchInput?.inputBox.inputElement;
529
+ if (inputElement) {
530
+ inputElement.setSelectionRange(0, 0);
531
+ inputElement.focus();
532
+ keyboardEvent.preventDefault();
533
+ }
534
+ }
535
+ else if (keyboardEvent.equals(KeyCode.PageDown)) {
536
+ const inputElement = this.searchInput?.inputBox.inputElement;
537
+ if (inputElement) {
538
+ const endOfText = inputElement.value.length;
539
+ inputElement.setSelectionRange(endOfText, endOfText);
540
+ inputElement.focus();
541
+ keyboardEvent.preventDefault();
542
+ }
543
+ }
522
544
  }
523
545
  onCaseSensitiveKeyDown(keyboardEvent) {
524
546
  if (keyboardEvent.equals(KeyMod.Shift | KeyCode.Tab)) {
@@ -104,7 +104,7 @@ let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
104
104
  this.registerEditorListeners();
105
105
  const scopedContextKeyService = assertIsDefined(this.scopedContextKeyService);
106
106
  InSearchEditor.bindTo(scopedContextKeyService).set(true);
107
- this.createQueryEditor(this.queryEditorContainer, this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, scopedContextKeyService])))), SearchContext.InputBoxFocusedKey.bindTo(scopedContextKeyService));
107
+ this.createQueryEditor(this.queryEditorContainer, this._register(this.instantiationService.createChild(( (new ServiceCollection([IContextKeyService, scopedContextKeyService]))))), SearchContext.InputBoxFocusedKey.bindTo(scopedContextKeyService));
108
108
  }
109
109
  createQueryEditor(container, scopedInstantiationService, inputBoxFocusedContextKey) {
110
110
  const searchEditorInputboxStyles = getInputBoxStyle({ inputBorder: searchEditorTextInputBorder });
@@ -121,7 +121,7 @@ let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
121
121
  this._register(this.queryEditorWidget.onDidToggleContext(() => this.triggerSearch({ resetCursor: false })));
122
122
  this.includesExcludesContainer = append(container, $('.includes-excludes'));
123
123
  this.toggleQueryDetailsButton = append(this.includesExcludesContainer, $('.expand' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button' }));
124
- this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 0, "Toggle Search Details"))));
124
+ this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 0, "Toggle Search Details"))));
125
125
  this._register(addDisposableListener(this.toggleQueryDetailsButton, EventType.CLICK, e => {
126
126
  EventHelper.stop(e);
127
127
  this.toggleIncludesExcludes();
@@ -713,7 +713,7 @@ SearchEditor = SearchEditor_1 = ( (__decorate([
713
713
  ( (__param(18, ILogService))),
714
714
  ( (__param(19, IHoverService)))
715
715
  ], SearchEditor)));
716
- const searchEditorTextInputBorder = registerColor('searchEditor.textInputBorder', { dark: inputBorder, light: inputBorder, hcDark: inputBorder, hcLight: inputBorder }, ( localizeWithPath(_moduleId, 8, "Search editor text input box border.")));
716
+ const searchEditorTextInputBorder = registerColor('searchEditor.textInputBorder', inputBorder, ( localizeWithPath(_moduleId, 8, "Search editor text input box border.")));
717
717
  function findNextRange(matchRanges, currentPosition) {
718
718
  for (const matchRange of matchRanges) {
719
719
  if (Position.isBefore(currentPosition, matchRange.getStartPosition())) {
@@ -15,7 +15,7 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
15
15
  import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
16
16
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
17
17
  import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
18
- import { SearchProviderType, isFileMatch, isProgressMessage, QueryType, deserializeSearchError, SearchErrorCode, SEARCH_RESULT_LANGUAGE_ID, FileMatch, pathIncludedInQuery } from 'vscode/vscode/vs/workbench/services/search/common/search';
18
+ import { SearchProviderType, isFileMatch, isProgressMessage, QueryType, deserializeSearchError, SearchErrorCode, SEARCH_RESULT_LANGUAGE_ID, DEFAULT_MAX_SEARCH_RESULTS, FileMatch, pathIncludedInQuery } from 'vscode/vscode/vs/workbench/services/search/common/search';
19
19
  import { editorMatchesToTextSearchResults, getTextSearchMatchWithModelContext } from 'vscode/vscode/vs/workbench/services/search/common/searchHelpers';
20
20
 
21
21
  let SearchService = class SearchService extends Disposable {
@@ -372,7 +372,7 @@ let SearchService = class SearchService extends Disposable {
372
372
  if (!this.matches(originalResource, query)) {
373
373
  return;
374
374
  }
375
- const askMax = isNumber(query.maxResults) ? query.maxResults + 1 : Number.MAX_SAFE_INTEGER;
375
+ const askMax = (isNumber(query.maxResults) ? query.maxResults : DEFAULT_MAX_SEARCH_RESULTS) + 1;
376
376
  let matches = model.findMatches(query.contentPattern.pattern, false, !!query.contentPattern.isRegExp, !!query.contentPattern.isCaseSensitive, query.contentPattern.isWordMatch ? query.contentPattern.wordSeparators : null, false, askMax);
377
377
  if (matches.length) {
378
378
  if (askMax && matches.length >= askMax) {