Fix top-buffer snippets not being added

This commit is contained in:
daedsidog 2024-03-16 02:13:57 +02:00
parent 21b5a22c7e
commit 4e8b91670a

View file

@ -409,8 +409,7 @@ REGIONS is a list of pairs of (start, end) lists."
;; We do not need to insert a line number indicator on
;; inline regions.
(unless (or region-inline region-continuous
(insert (format " (Line %d)" lineno))))
(setq is-top-snippet nil))
(insert (format " (Line %d)" lineno))))))
(if is-top-snippet
(setq is-top-snippet nil)
(when (and (not region-inline)
@ -437,7 +436,7 @@ REGIONS is a list of pairs of (start, end) lists."
(cons buffer
(list
(list start end)))))))
(setq previous-region (cons start end)))))
(setq previous-region (cons start end))))
(unless (= (cl-second (car (last regions))) buffer-point-max)
(insert "\n..."))
(insert "\n```"))