From 6a5ef4d3c498f9f28cccc5066aa5fb8b3ede80c4 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 13 Oct 2023 17:39:32 +0200 Subject: fix more: search-buffer-p check before seach buf cond --- lisp/mastodon-tl.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lisp') 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)) -- cgit v1.2.3