Fix magit-section-beginning-position.
* magit.el (magit-section-beginning-position): Just search backwards for the first property change, don't try to skip over children.
This commit is contained in:
parent
ae5b5d4fe0
commit
f042b74925
1 changed files with 5 additions and 8 deletions
13
magit.el
13
magit.el
|
@ -349,14 +349,11 @@ Many Magit faces inherit from this one by default."
|
|||
(not (eq (cadr s2) (cadr s1))))))
|
||||
|
||||
(defun magit-section-beginning-position (p)
|
||||
(let ((s1 (magit-section-mark p)))
|
||||
(if (not s1)
|
||||
nil
|
||||
(while (let ((s2 (magit-section-mark (- p 1))))
|
||||
(not (magit-section-sibling-or-higher-p s1 s2)))
|
||||
(setq p (previous-single-property-change p 'magit-section
|
||||
nil (point-min))))
|
||||
p)))
|
||||
(previous-single-property-change (if (= p (point-max))
|
||||
p
|
||||
(+ p 1))
|
||||
'magit-section
|
||||
nil (point-min)))
|
||||
|
||||
(defun magit-section-ending-position (p)
|
||||
(let ((s1 (magit-section-mark p)))
|
||||
|
|
Loading…
Add table
Reference in a new issue