提交 95740d00 编写于 作者: B Benjamin Pasero

Warning not shown in readonly settings editor for commands such as copy paste (fixes #37360)

上级 0c7f237d
......@@ -787,12 +787,13 @@ export class DefaultPreferencesEditor extends BaseTextEditor {
const editor = this.instantiationService.createInstance(DefaultPreferencesCodeEditor, parent.getHTMLElement(), configuration);
// Inform user about editor being readonly if user starts type
this.toUnbind.push(editor.onDidType(() => this.onDidType(editor)));
this.toUnbind.push(editor.onDidType(() => this.showReadonlyHint(editor)));
this.toUnbind.push(editor.onDidPaste(() => this.showReadonlyHint(editor)));
return editor;
}
private onDidType(editor: editorCommon.ICommonCodeEditor): void {
private showReadonlyHint(editor: editorCommon.ICommonCodeEditor): void {
const messageController = MessageController.get(editor);
if (!messageController.isVisible()) {
messageController.showMessage(nls.localize('defaultEditorReadonly', "Edit in the right hand side editor to override defaults."), editor.getSelection().getPosition());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册