From 608deff68713e7ea2561d0334b81a6a58e568f66 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 29 Mar 2024 13:47:16 +0100 Subject: bookmarking: no move when checking bookmarked-p status --- lisp/mastodon-tl.el | 2 ++ lisp/mastodon-toot.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 4c0375d..c3147b6 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1803,6 +1803,8 @@ Move forward (down) the timeline unless NO-MOVE is non-nil. BACKWARD means move backward (up) the timeline." (if no-move (get-text-property (point) prop) + ;; NB: this doesn't differentiate absence of property from + ;; property set to zero, making flag props fraught: (or (get-text-property (point) prop) (save-excursion (if backward diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index a48d5d9..d6232d5 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -459,7 +459,7 @@ SUBTRACT means we are un-favouriting or unboosting, so we decrement." (interactive) (mastodon-tl--do-if-item-strict (let* ((id (mastodon-tl--property 'base-item-id)) - (bookmarked-p (mastodon-tl--property 'bookmarked-p)) + (bookmarked-p (mastodon-tl--property 'bookmarked-p :no-move)) (byline-region (when id (mastodon-tl--find-property-range 'byline (point)))) (action (if bookmarked-p "unbookmark" "bookmark")) -- cgit v1.2.3