[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit d73a3b11db 09/12: Record child sections in reve
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit d73a3b11db 09/12: Record child sections in reverse in log buffers |
Date: |
Sun, 6 Aug 2023 21:59:41 -0400 (EDT) |
branch: elpa/git-commit
commit d73a3b11db7c25175cf710b1b135ff7e07125115
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Record child sections in reverse in log buffers
It might be nice to just always do that, but we first have to if there
is any code that accesses siblings during washing, which would need to
be adjusted.
---
lisp/magit-log.el | 5 ++++-
lisp/magit-section.el | 6 ++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index 524c1eb420..aed2479bdb 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -1116,7 +1116,8 @@ Type \\[magit-reset] to reset `HEAD' to the commit at
point.
(let ((delay (cl-find-if (lambda (arg)
(member arg '("++header" "--patch" "--stat")))
args)))
- (setq magit-section-inhibit-markers (if delay 'delay t)))
+ (setq magit-section-inhibit-markers (if delay 'delay t))
+ (setq magit-section-insert-in-reverse (not delay)))
(magit-insert-section (logbuf)
(magit--insert-log t revs args files))))
@@ -1677,6 +1678,7 @@ Type \\[magit-log-select-quit] to abort without selecting
a commit."
(defun magit-log-select-refresh-buffer ()
(setq magit-section-inhibit-markers t)
+ (setq magit-section-insert-in-reverse t)
(magit-insert-section (logbuf)
(magit--insert-log t magit-buffer-revisions magit-buffer-log-args)))
@@ -1772,6 +1774,7 @@ Type \\[magit-cherry-pick] to apply the commit at point.
(defun magit-cherry-refresh-buffer ()
(setq magit-section-inhibit-markers t)
+ (setq magit-section-insert-in-reverse t)
(magit-insert-section (cherry)
(magit-run-section-hook 'magit-cherry-sections-hook)))
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 9d0bc26d3d..e75e64eb8d 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -274,6 +274,7 @@ no effect. This also has no effect for Emacs >= 28, where
(defvar-local magit-section-unhighlight-sections nil)
(defvar-local magit-section-inhibit-markers nil)
+(defvar-local magit-section-insert-in-reverse nil)
;;; Faces
@@ -1401,10 +1402,15 @@ anything this time around.
(oset section end (copy-marker (oref section end) t)))))
(let ((magit-section-cache-visibility nil))
(magit-section-show ,s)))
+ (magit-section-insert-in-reverse
+ (push ,s (oref (oref ,s parent) children)))
((let ((parent (oref ,s parent)))
(oset parent children
(nconc (oref parent children)
(list ,s)))))))
+ (when magit-section-insert-in-reverse
+ (setq magit-section-insert-in-reverse nil)
+ (oset ,s children (nreverse (oref ,s children))))
,s))))
(defun magit-cancel-section ()
- [nongnu] elpa/git-commit updated (dd6ecd5fe5 -> e7ff79dcf1), ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit d536ef9e21 06/12: Don't preserve visibility in log buffers, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit 8cff832f37 01/12: Fix typo, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit e32cec06a4 08/12: magit-log-show-signatures-limit: New option, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit daed531696 03/12: magit-insert-section: Cosmetics, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit 241b327b7a 05/12: Don't use markers in log buffers, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit 4012494f30 04/12: magit-insert-section: More cosmetics, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit d73a3b11db 09/12: Record child sections in reverse in log buffers,
ELPA Syncer <=
- [nongnu] elpa/git-commit 49f20e7ca4 11/12: log: Drop extra word from -n limit messages, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit 6014320c3e 10/12: magit-module-confirm: Use refresh cache, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit e7ff79dcf1 12/12: magit-log-color-graph-limit: Drop stray words from docstring, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit 545a64c3ee 07/12: magit-log-color-graph-limit: New option, ELPA Syncer, 2023/08/06
- [nongnu] elpa/git-commit b3f7e24616 02/12: magit-map-sections: New function, ELPA Syncer, 2023/08/06