diff options
author | Sean Allred <code@seanallred.com> | 2015-01-02 12:47:03 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2015-01-02 12:47:03 -0500 |
commit | cf97f4c691ff5a2ee001e1f22e2eed0d7f6a9df8 (patch) | |
tree | 2f521c8f35a9a65f9da02eab4ff83257aa0a0260 /sx-question-list.el | |
parent | 542ddf73506c2c297106e4b3f4ec0a1d80a35ad8 (diff) | |
parent | 9a420bffcc426b4826f14ad1f62b5430750821df (diff) |
Merge branch 'master' into goto-map
Diffstat (limited to 'sx-question-list.el')
-rw-r--r-- | sx-question-list.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sx-question-list.el b/sx-question-list.el index 4f71251..cf849db 100644 --- a/sx-question-list.el +++ b/sx-question-list.el @@ -317,6 +317,7 @@ into consideration. (":" sx-question-list-switch-site) ("t" sx-tab-switch) ("a" sx-ask) + ("s" sx-search) ("v" sx-visit-externally) ("u" sx-toggle-upvote) ("d" sx-toggle-downvote) @@ -333,6 +334,11 @@ Non-interactively, DATA is a question alist." (tabulated-list-get-id) (sx-user-error "Not in `sx-question-list-mode'")))) (sx-question--mark-hidden data) + ;; The current entry will not be present after the list is + ;; redisplayed. To avoid `tabulated-list-mode' getting lost (and + ;; sending us to the top) we move to the next entry before + ;; redisplaying. + (forward-line 1) (when (called-interactively-p 'any) (sx-question-list-refresh 'redisplay 'noupdate))) @@ -554,12 +560,11 @@ This does not update `sx-question-mode--window'." (defun sx-question-list-switch-site (site) "Switch the current site to SITE and display its questions. -Use `ido-completing-read' if variable `ido-mode' is active. Retrieve completions from `sx-site-get-api-tokens'. Sets `sx-question-list--site' and then call `sx-question-list-refresh' with `redisplay'." (interactive - (list (funcall (if ido-mode #'ido-completing-read #'completing-read) + (list (sx-completing-read "Switch to site: " (sx-site-get-api-tokens) (lambda (site) (not (equal site sx-question-list--site))) t))) |