File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src-shared/nextjournal/clojure_mode/extensions Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1515 (= \\ (.. state -doc (slice (max 0 (dec pos)) pos) toString)))
1616
1717(defn backspace-backoff [state from to]
18+ #_ (js/console.log (some-> (n/|node state from) (u/guard n/line-comment?)))
1819 (if
1920 ; ; handle line-comments (backspace should not drag forms up into line comments)
2021 (and
21- ; ; we are directly in front of a line-comment
22+ ; ; we are directly in right of a line-comment
2223 (some-> (n/node| state (dec from)) (u/guard n/line-comment?))
23- ; ; current line is blank
24- (not (str/blank? (u/line-content-at state from))))
24+ ; ; current line is blank or we're left of a line-comment
25+ (not (or (str/blank? (u/line-content-at state from))
26+ (some-> (n/|node state from) (u/guard n/line-comment?)))))
2527 {:cursor (dec from)}
2628 (u/deletion from to)))
2729
Original file line number Diff line number Diff line change 125125 " \" [|]\" " " \" |]\" " ; ; normal deletion inside strings
126126 " ( ;;\n |)" " ( ;;|\n )" ; ; don't put paren behind line comment
127127 " ( ;|\n )" " ( |\n )"
128- " (;;\n |;;\n )" " (;;|\n ;;\n )"
129- ))
128+ " (;;\n |;;\n )" " (;;|;;\n )" ))
130129
131130 #?(:squint nil
132131 :cljs (testing " handle backspace (embedded)"
You can’t perform that action at this time.
0 commit comments