aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-12-17 12:36:37 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-12-22 10:46:41 -0200
commit5c965d196ff4dcd043577ecdacdd75b21482ea9c (patch)
tree76c0e4e1a93de14d33368cecb9fffd16d156dbef
parent3de378c215fdfa82df821df1339b0f1504d4a469 (diff)
Fix buffer not updating after posting answers/edits.
-rw-r--r--sx-interaction.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/sx-interaction.el b/sx-interaction.el
index da08581..177a054 100644
--- a/sx-interaction.el
+++ b/sx-interaction.el
@@ -93,10 +93,11 @@ If it's not a question, or if it is read, return DATA."
If BUFFER is not live, nothing is done."
(setq buffer (or buffer (current-buffer)))
(when (buffer-live-p buffer)
- (cond ((derived-mode-p 'sx-question-list-mode)
- (sx-question-list-refresh 'redisplay 'no-update))
- ((derived-mode-p 'sx-question-mode)
- (sx-question-mode-refresh 'no-update)))))
+ (with-current-buffer buffer
+ (cond ((derived-mode-p 'sx-question-list-mode)
+ (sx-question-list-refresh 'redisplay 'no-update))
+ ((derived-mode-p 'sx-question-mode)
+ (sx-question-mode-refresh 'no-update))))))
(defun sx--copy-data (from to)
"Copy all fields of alist FORM onto TO.