From 7f61feb1ea4756ecac99d3cb604aadb2bf8d55f0 Mon Sep 17 00:00:00 2001 From: seven Date: Wed, 8 Jan 2025 00:34:42 +0800 Subject: [PATCH] feat: re-set the position after format (#152) feat: set the position to the start of action line after user trigger indent action obsolete now. Refs: #150 Signed-off-by: seven --- src/views/editor/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index c792fcae..9617bf06 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -204,6 +204,7 @@ const autoIndentAction = (editor: monaco.editor.IStandaloneCodeEditor, position: // @ts-ignore inverseEditOperations => [], ); + editor.setPosition({ lineNumber: startLineNumber + 1, column: 1 }); } catch (err) { message.error(lang.t('editor.invalidJson'), { closable: true,