aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-24 14:56:02 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-24 14:56:02 +0000
commit59b91fde7dd9bd6d9a389494e0af2cd7d162c5fe (patch)
tree74831c533eaf2b47a6430ee0a5bb04e6939a7d71
parentdce1f846b63d029a3f4175e5fb95513e2e355bbc (diff)
Fix next-page bug
-rw-r--r--sx-question-list.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/sx-question-list.el b/sx-question-list.el
index 708c6eb..4719d84 100644
--- a/sx-question-list.el
+++ b/sx-question-list.el
@@ -152,6 +152,7 @@ Also see `sx-question-list-refresh'."
"Number of pages currently being displayed.
This variable gets reset to 0 before every refresh.
It should be used by `sx-question-list--next-page-function'.")
+(make-variable-buffer-local 'sx-question-list--pages-so-far)
(defvar sx-question-list--refresh-function nil
"Function used to refresh the list of questions to be displayed.
@@ -244,7 +245,7 @@ the value manually.
(setq tabulated-list-padding 1)
;; Sorting by title actually sorts by date. It's what we want, but
;; it's not terribly intuitive.
- (setq tabulated-list-sort-key '("Title" . nil))
+ (setq tabulated-list-sort-key nil)
(add-hook 'tabulated-list-revert-hook
#'sx-question-list-refresh nil t)
(add-hook 'tabulated-list-revert-hook
@@ -359,7 +360,8 @@ a new list before redisplaying."
(interactive "p\nP")
;; Reset the mode-line unread count (we rebuild it here).
(setq sx-question-list--unread-count 0)
- (setq sx-question-list--pages-so-far 0)
+ (unless no-update
+ (setq sx-question-list--pages-so-far 0))
(let ((question-list
(or (and no-update sx-question-list--dataset)
(and (functionp sx-question-list--refresh-function)