From 028ab8ea22283fe4ae956894ef4cb6b002e2272e Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 30 Jul 2024 14:57:19 +0200 Subject: fix newlines accumulating on (un)folding toots --- lisp/mastodon-tl.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 908a063..70d0223 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1602,6 +1602,7 @@ Folding decided by `mastodon-tl--fold-toots-at-length'." (save-excursion (goto-char beg) (delete-region beg end) + (delete-char 1) ;; prevent newlines accumulating (mastodon-tl--toot toot nil nil nil (when (not fold) :unfolded))) ;; move point to line where text formerly ended: @@ -1612,7 +1613,9 @@ Folding decided by `mastodon-tl--fold-toots-at-length'." (defun mastodon-tl--fold-post () "Fold post at point, if it is too long." (interactive) - (mastodon-tl--unfold-post :fold)) + (mastodon-tl--unfold-post :fold) + ;; inserting leaves us at beg of toot, so let's leave point at byline: + (mastodon-tl--goto-next-item)) ;; from mastodon-alt.el: (defun mastodon-tl--toot-for-stats (&optional toot) -- cgit v1.2.3