aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2019-01-14 09:23:00 -0600
committerGitHub <noreply@github.com>2019-01-14 09:23:00 -0600
commit49358eae36dd4bb5b9207313b30df085e7f25cef (patch)
tree5e3a1dd5dbddd06cb6a885dcedc08153896d97bc
parenta214f46b15eb29eaf02abdd4ddc2f90c3925d15f (diff)
parent38ab6e1f1a20f229ec7d7a478dc6ebf5c97823fd (diff)
Merge pull request #359 from vermiculus/bug/358
Do not corrupt the answer list while sorting
-rw-r--r--sx-question-print.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/sx-question-print.el b/sx-question-print.el
index 22226b3..aefddf0 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -244,7 +244,7 @@ QUESTION must be a data structure returned by `json-read'."
(mapc #'sx-question-mode--print-section
(cl-remove-if
#'sx--deleted-p
- (cl-sort .answers sx-question-mode-answer-sort-function))))
+ (cl-sort (copy-sequence .answers) sx-question-mode-answer-sort-function))))
(insert "\n\n ")
(insert-text-button "Write an Answer" :type 'sx-button-answer)
(run-hooks 'sx-question-mode-after-print-hook)