Skip to content

Commit b791463

Browse files
committed
Only refresh on buffer save
1 parent 7594407 commit b791463

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/interactive_syntax/core.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@
496496
(@visr-commit!))
497497
(ocall fs :writeFile (js/path.join @current-folder @current-file) @input
498498
(fn [err res]
499+
(editor/make-reset-editors-cache cache)
499500
(reset! file-changed false)
500501
(swap! menu pop)
501502
(if-let [cm @cm-ref]
@@ -1181,7 +1182,6 @@
11811182
(when (and @edit (not= o n))
11821183
(let [fc @file-changed]
11831184
(set! js/window.edit @edit)
1184-
(editor/make-reset-editors-cache cache)
11851185
(-> @edit (ocall :getDoc) (ocall :setValue @input))
11861186
(reset! file-changed fc))))
11871187
codemirror-options #(conj (env/codemirror-options db) print-options)]

test/interactive_syntax/core_test.cljs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,7 @@
16911691
:set [:input] use2 :check
16921692
:done #(done))))))
16931693

1694+
16941695
(deftest visr-in-mod-change
16951696
(testing "Ensure editor updates when its surrounding module changes"
16961697
(async
@@ -1771,6 +1772,7 @@
17711772
"World"))
17721773
:done #(done))))))
17731774

1775+
17741776
(deftest runtime-error
17751777
(testing "Ensure printout when runtime error occurs"
17761778
(async
@@ -1807,6 +1809,7 @@
18071809
:set [:output] res :check
18081810
:done #(done))))))
18091811

1812+
18101813
(deftest visrs-reset-on-file-change
18111814
(testing "Ensure visrs are removed when the file changes"
18121815
(async
@@ -1854,6 +1857,7 @@
18541857
:do #(is (= (count (.queryAllByLabelText view strings/VISUAL)) 0))
18551858
:done #(done))))))
18561859

1860+
18571861
(deftest test-main-functions
18581862
(testing "Ensure default called functions match run-functions"
18591863
(async
@@ -2068,6 +2072,7 @@
20682072
:set [:output] output :check
20692073
:done #(done))))))
20702074

2075+
20712076
(defn -main [& args]
20722077
(run-tests-async 240000))
20732078

0 commit comments

Comments
 (0)