Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)

* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c

* remove files we don't want

* fix hygiene

* update distro

* update distro

* fix hygiene

* fix strict nulls

* distro

* distro

* fix tests

* fix tests

* add another edit

* fix viewlet icon

* fix azure dialog

* fix some padding

* fix more padding issues
This commit is contained in:
Anthony Dresser
2019-12-04 19:28:22 -08:00
committed by GitHub
parent a8818ab0df
commit f5ce7fb2a5
1507 changed files with 42813 additions and 27370 deletions

View File

@@ -395,11 +395,27 @@ export class FindController extends CommonFindController implements IFindControl
this._createFindWidget();
}
if (!this._widget!.getPosition() && this._editor.getOption(EditorOption.find).autoFindInSelection) {
// not visible yet so we need to set search scope if `editor.find.autoFindInSelection` is `true`
opts.updateSearchScope = true;
const selection = this._editor.getSelection();
let updateSearchScope = false;
switch (this._editor.getOption(EditorOption.find).autoFindInSelection) {
case 'always':
updateSearchScope = true;
break;
case 'never':
updateSearchScope = false;
break;
case 'multiline':
const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber;
updateSearchScope = isSelectionMultipleLine;
break;
default:
break;
}
opts.updateSearchScope = updateSearchScope;
super._start(opts);
if (opts.shouldFocus === FindStartFocusAction.FocusReplaceInput) {
@@ -439,7 +455,7 @@ export class StartFindAction extends EditorAction {
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
weight: KeybindingWeight.EditorContrib
},
menubarOpts: {
menuOpts: {
menuId: MenuId.MenubarEditMenu,
group: '3_find',
title: nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, "&&Find"),
@@ -489,7 +505,7 @@ export class StartFindWithSelectionAction extends EditorAction {
forceRevealReplace: false,
seedSearchStringFromSelection: true,
seedSearchStringFromGlobalClipboard: false,
shouldFocus: FindStartFocusAction.FocusFindInput,
shouldFocus: FindStartFocusAction.NoFocusChange,
shouldAnimate: true,
updateSearchScope: false
});
@@ -685,7 +701,7 @@ export class StartFindReplaceAction extends EditorAction {
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_F },
weight: KeybindingWeight.EditorContrib
},
menubarOpts: {
menuOpts: {
menuId: MenuId.MenubarEditMenu,
group: '3_find',
title: nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, "&&Replace"),