Skip to content

Commit c579066

Browse files
committed
slurp backwards
1 parent 91954dd commit c579066

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src-shared/nextjournal/clojure_mode/commands.cljc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@
167167
-1
168168
(let [^string edge (n/left-edge-with-prefix state parent)
169169
start (n/start (n/with-prefix parent))]
170-
[{:from start
171-
:to (+ start (count edge))
172-
:insert " "}
170+
[(cond-> {:from start
171+
:to (+ start (count edge))}
172+
(not str?) (j/assoc! :insert " "))
173173
{:from (n/start target)
174174
:insert edge}]))}))))))))
175175

test/nextjournal/clojure_mode_tests.cljc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@
273273
"('xy|z 1) 2" 1 "('xy|z 1 2)"
274274
"'ab|c 1" 1 "'ab|c 1"
275275

276-
"\"x|\" 1" 1 "\"x| 1\""))
276+
"\"x|\" 1" 1 "\"x| 1\""
277+
"1 \"x|\"" -1 "\"1 x|\""))
277278

278279
#?(:squint nil
279280
:cljs

0 commit comments

Comments
 (0)