mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
Better handling of hidden sections with 'n' and 'p'.
* magit.el (magit-goto-next-section, magit-prev-section): Don't descend into hidden sections.
This commit is contained in:
parent
246eb467b7
commit
2bf9c19866
1 changed files with 4 additions and 2 deletions
6
magit.el
6
magit.el
|
@ -435,7 +435,8 @@ Many Magit faces inherit from this one by default."
|
|||
(defun magit-goto-next-section ()
|
||||
(interactive)
|
||||
(let* ((section (magit-current-section))
|
||||
(next (or (and (magit-section-children section)
|
||||
(next (or (and (not (magit-section-hidden section))
|
||||
(magit-section-children section)
|
||||
(magit-find-section-after (point)
|
||||
(magit-section-children
|
||||
section)))
|
||||
|
@ -450,7 +451,8 @@ Many Magit faces inherit from this one by default."
|
|||
(let ((prev (cadr (memq section
|
||||
(reverse (magit-section-children parent))))))
|
||||
(cond (prev
|
||||
(while (magit-section-children prev)
|
||||
(while (and (not (magit-section-hidden prev))
|
||||
(magit-section-children prev))
|
||||
(setq prev (car (reverse (magit-section-children prev)))))
|
||||
prev)
|
||||
(t
|
||||
|
|
Loading…
Reference in a new issue