Browse Source

fix: cursor position bug in code-block

Tienson Qin 4 months ago
parent
commit
6e9864a3b6
1 changed files with 0 additions and 5 deletions
  1. 0 5
      src/main/frontend/extensions/code.cljs

+ 0 - 5
src/main/frontend/extensions/code.cljs

@@ -585,11 +585,6 @@
                      (reset! (:last-theme state) next-theme)
                      (.setOption editor' "theme" next-theme)))
                  (reset! (:code-options state) (last (:rum/args state)))
-                 (when-not (:file? (first (:rum/args state)))
-                   (let [code (nth (:rum/args state) 3)
-                         editor' @(:editor-atom state)]
-                     (when (and editor' (not= (.getValue editor') code))
-                       (.setValue editor' code))))
                  state)}
   [state _config id attr code _theme _options]
   [:div.extensions__code.flex.flex-1