diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-01-07 09:44:14 +1100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-01-07 09:44:14 +1100 |
commit | 77bc927b3dbb7c97463815b5e03084cf47c57adf (patch) | |
tree | 00cbf5fd33b73719977d6304fd2d23a8a57afe99 /lisp/mastodon-toot.el | |
parent | 984ccae6662c8d2c195505a6dfddc45f6de2e85c (diff) |
tl--action-success: only move point if it was on byline
FIX #326
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 3406ec4..56ad4ed 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -285,7 +285,8 @@ modified. Remove MARKER if REMOVE is non-nil, otherwise add it." (let ((inhibit-read-only t) (bol (car byline-region)) - (eol (cdr byline-region))) + (eol (cdr byline-region)) + (at-byline-p (eq (get-text-property (point) 'byline) t))) (save-excursion (when remove (goto-char bol) @@ -297,9 +298,10 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (goto-char bol) (insert (format "(%s) " (propertize marker 'face 'success))))) + (when at-byline-p ;; leave point after the marker: - (unless remove - (mastodon-tl--goto-next-toot)))) + (unless remove + (mastodon-tl--goto-next-toot))))) (defun mastodon-toot--action (action callback) "Take ACTION on toot at point, then execute CALLBACK. |