mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-23 13:20:30 -04:00
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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user