aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-13 17:39:32 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-13 17:39:32 +0200
commit6a5ef4d3c498f9f28cccc5066aa5fb8b3ede80c4 (patch)
tree4a86c5e6246f5afa038ae4e1df103b0bd6267797 /lisp
parentc67d1f80f60754baa5ee8a53065d6219546b3d5b (diff)
fix more: search-buffer-p check before seach buf cond
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ad214e8..054c1e2 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2349,15 +2349,15 @@ HEADERS is the http headers returned in the response, if any."
(json (if headers (car response) response))
;; FIXME: max-id pagination works for statuses only, not other
;; search results pages:
- (json (cond ((equal "statuses" (mastodon-search--buf-type))
- (cdr ; avoid repeat of last status
- (alist-get 'statuses response)))
- ((equal "hashtags" (mastodon-search--buf-type))
- (alist-get 'hashtags response))
- ((equal "accounts" (mastodon-search--buf-type))
- (alist-get 'accounts response))
- (t
- json)))
+ (json (if (mastodon-tl--search-buffer-p)
+ (cond ((equal "statuses" (mastodon-search--buf-type))
+ (cdr ; avoid repeat of last status
+ (alist-get 'statuses response)))
+ ((equal "hashtags" (mastodon-search--buf-type))
+ (alist-get 'hashtags response))
+ ((equal "accounts" (mastodon-search--buf-type))
+ (alist-get 'accounts response)))
+ json))
(headers (if headers (cdr response) nil))
(link-header (mastodon-tl--get-link-header-from-response headers)))
(goto-char (point-max))