Fix bug when buffer is empty

This commit is contained in:
Benson Chu 2025-06-22 09:33:32 -05:00
parent 42b213de71
commit bf2867688e

View file

@ -29,6 +29,7 @@
(not (= self-chat-num self-chat-last))) (not (= self-chat-num self-chat-last)))
(setq self-chat-last2 self-chat-last (setq self-chat-last2 self-chat-last
self-chat-last self-chat-num)) self-chat-last self-chat-num))
(unless (and (eobp) (bobp))
;; Are we fixing up an old line, or creating a new one? ;; Are we fixing up an old line, or creating a new one?
(if (save-excursion (if (save-excursion
(beginning-of-line) (beginning-of-line)
@ -37,7 +38,7 @@
(beginning-of-line) (beginning-of-line)
(kill-line)) (kill-line))
(call-interactively #'newline) (call-interactively #'newline)
(call-interactively #'newline)) (call-interactively #'newline)))
(insert "> ")) (insert "> "))
(defun chat-post () (defun chat-post ()