Fix visibility memory. How did this ever work?
* magit.el (magit-top-section): Make the right variable permanent. (magit-new-section): Don't fail when there are no old sections.
This commit is contained in:
parent
0ea2d919c8
commit
d6e4c40364
1 changed files with 4 additions and 3 deletions
7
magit.el
7
magit.el
|
@ -294,7 +294,7 @@ Many Magit faces inherit from this one by default."
|
|||
|
||||
(defvar magit-top-section nil)
|
||||
(make-variable-buffer-local 'magit-top-section)
|
||||
(put 'magit-submode 'permanent-local t)
|
||||
(put 'magit-top-section 'permanent-local t)
|
||||
|
||||
(defvar magit-old-top-section nil)
|
||||
|
||||
|
@ -302,8 +302,9 @@ Many Magit faces inherit from this one by default."
|
|||
(let* ((s (make-magit-section :parent magit-top-section
|
||||
:title title
|
||||
:type type))
|
||||
(old (magit-find-section (magit-section-path s)
|
||||
magit-old-top-section)))
|
||||
(old (and magit-old-top-section
|
||||
(magit-find-section (magit-section-path s)
|
||||
magit-old-top-section))))
|
||||
(if magit-top-section
|
||||
(setf (magit-section-children magit-top-section)
|
||||
(append (magit-section-children magit-top-section)
|
||||
|
|
Loading…
Reference in a new issue