diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-07-30 14:57:19 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-07-30 15:03:08 +0200 |
commit | 028ab8ea22283fe4ae956894ef4cb6b002e2272e (patch) | |
tree | 7dc8fb4a6b2fd3660dff1283644ae66d0d2b3194 /lisp/mastodon-tl.el | |
parent | dd1b0ab77043508623e0bb0e7861beeeb00c8e2f (diff) |
fix newlines accumulating on (un)folding toots
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 5 |
1 files changed, 4 insertions, 1 deletions
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) |