aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-04-28 15:01:30 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-04-28 15:25:08 +0200
commitc9b7327e411893855ef5564de8a1cdcd3fff102a (patch)
tree010b3b9c7e91980b9561d75f7ceb470b3108dad4 /lisp
parentd2aea126a9d5a5873a835a8ed390956c481c587c (diff)
fix thread marker to leave point on right toot.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 5175370..7b2fcac 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1723,8 +1723,7 @@ view all branches of a thread."
(mastodon-http--api (concat "statuses/" id))
nil
:silent))
- (context (mastodon-http--get-json url nil :silent))
- (marker (make-marker)))
+ (context (mastodon-http--get-json url nil :silent)))
(if (equal (caar toot) 'error)
(message "Error: %s" (cdar toot))
(when (member (alist-get 'type toot) '("reblog" "favourite"))
@@ -1735,7 +1734,8 @@ view all branches of a thread."
;; if we have a thread:
(progn
(with-current-buffer (get-buffer-create buffer)
- (let ((inhibit-read-only t))
+ (let ((inhibit-read-only t)
+ (marker (make-marker)))
(switch-to-buffer buffer)
(erase-buffer)
(mastodon-mode)
@@ -1747,10 +1747,10 @@ view all branches of a thread."
(move-marker marker (point))
;; print re-fetched toot:
(mastodon-tl--toot toot :detailed-p)
- (mastodon-tl--timeline (alist-get 'descendants context))))
- ;; put point at the toot:
- (goto-char (marker-position marker))
- (mastodon-tl--goto-next-toot))
+ (mastodon-tl--timeline (alist-get 'descendants context))
+ ;; put point at the toot:
+ (goto-char (marker-position marker))
+ (mastodon-tl--goto-next-toot))))
;; else just print the lone toot:
(mastodon-tl--single-toot id)))))))