From 0ae775874ae6cb5979472a88461b48f367d8fbc6 Mon Sep 17 00:00:00 2001 From: lajbel Date: Thu, 24 Oct 2024 13:34:51 -0300 Subject: [PATCH] chore: fix formatter --- src/actions/format.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/actions/format.ts b/src/actions/format.ts index dd35131..b5e0a1b 100644 --- a/src/actions/format.ts +++ b/src/actions/format.ts @@ -8,5 +8,7 @@ export const format = () => { indent_char: " ", }); + const oldPos = $editorInstance.get()?.getPosition(); $editorInstance.get()?.setValue(formattedCode); + $editorInstance.get()?.setPosition(oldPos!); };