提交 2c0ba64b 编写于 作者: R rebornix

Re #93332. Save state for find widget ctrl enter warning for syncing.

上级 16a06751
......@@ -27,6 +27,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { EditorOption } from 'vs/editor/common/config/editorOptions';
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
const SEARCH_STRING_MAX_LENGTH = 524288;
......@@ -383,6 +384,7 @@ export class FindController extends CommonFindController implements IFindControl
@IThemeService private readonly _themeService: IThemeService,
@INotificationService private readonly _notificationService: INotificationService,
@IStorageService _storageService: IStorageService,
@IStorageKeysSyncRegistryService private readonly _storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
@optional(IClipboardService) clipboardService: IClipboardService,
) {
super(editor, _contextKeyService, _storageService, clipboardService);
......@@ -437,7 +439,7 @@ export class FindController extends CommonFindController implements IFindControl
}
private _createFindWidget() {
this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService));
this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._storageKeysSyncRegistryService));
this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService, this._themeService));
}
}
......
......@@ -36,6 +36,7 @@ import { ContextScopedFindInput, ContextScopedReplaceInput } from 'vs/platform/b
import { AccessibilitySupport } from 'vs/platform/accessibility/common/accessibility';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
export interface IFindController {
replace(): void;
......@@ -152,6 +153,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
themeService: IThemeService,
storageService: IStorageService,
notificationService: INotificationService,
storageKeysSyncRegistryService: IStorageKeysSyncRegistryService
) {
super();
this._codeEditor = codeEditor;
......@@ -163,6 +165,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
this._storageService = storageService;
this._notificationService = notificationService;
storageKeysSyncRegistryService.registerStorageKey({ key: ctrlEnterReplaceAllWarningPromptedKey, version: 1 });
this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, StorageScope.GLOBAL);
this._isVisible = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册