summaryrefslogtreecommitdiff
path: root/lisp/bookmark.el
diff options
context:
space:
mode:
authorKarl Fogel <kfogel@red-bean.com>2022-04-25 12:30:02 -0500
committerKarl Fogel <kfogel@red-bean.com>2022-04-25 12:30:02 -0500
commit42366383c6327e731e286266665d1bb3d6ab1526 (patch)
tree19b74def20686dff700aac662828dd9b34a4a0e8 /lisp/bookmark.el
parentec4dabc2381df6d803bb6ff4c294ef0d374857b4 (diff)
downloademacs-42366383c6327e731e286266665d1bb3d6ab1526.tar.gz
Update bookmark sort indicator at proper time
This follows up to my commit 8b071c77b0d7 of 2022-04-24. Thanks to Manuel Giraud <manuel@ledu-giraud.fr> for reporting the buglet.
Diffstat (limited to 'lisp/bookmark.el')
-rw-r--r--lisp/bookmark.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 6c46268a342..c604395dd7d 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1823,7 +1823,6 @@ Don't affect the buffer ring order."
,@(if bookmark-bmenu-toggle-filenames
(list location))])
entries)))
- (tabulated-list-init-header)
;; The value of `bookmark-sort-flag' might have changed since the
;; last time the buffer contents were generated, so re-check it.
(if bookmark-sort-flag
@@ -1846,7 +1845,12 @@ Don't affect the buffer ring order."
;; `bookmark-sort-flag' will happen again and the buffer will
;; go back to a creation-order sort. This is all expected
;; behavior, as documented in `bookmark-bmenu-mode'.
- (setq tabulated-list-entries (reverse entries))))
+ (setq tabulated-list-entries (reverse entries)))
+ ;; Generate the header only after `tabulated-list-sort-key' is
+ ;; settled, because if that's non-nil then the sort-direction
+ ;; indicator will be shown in the named column, but if it's
+ ;; nil then the indicator will not be shown.
+ (tabulated-list-init-header))
(tabulated-list-print t))
;;;###autoload