提交 de51dd43 编写于 作者: B Benjamin Pasero

untitled - mode-switch only for line 1, col 1

上级 1302e22b
......@@ -214,8 +214,8 @@ export class TextResourceEditor extends AbstractTextResourceEditor {
}
private onDidEditorPaste(e: IPasteEvent, codeEditor: ICodeEditor): void {
if (e.range.startLineNumber !== 1) {
return; // only when pasting into first line (= likely empty document)
if (e.range.startLineNumber !== 1 && e.range.startColumn !== 1) {
return; // only when pasting into first line, first column (= empty document)
}
if (codeEditor.getOption(EditorOption.readOnly)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册