From a25ff334f0aa81c12a6e29b1bccfcd2b76a0ce0e Mon Sep 17 00:00:00 2001 From: seven Date: Wed, 8 Jan 2025 00:21:44 +0800 Subject: [PATCH] feat: set the position to the action start of line when user trigger indent action 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,