emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit 410e4583e0 1/2: Enable navigating broken sectio


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 410e4583e0 1/2: Enable navigating broken sections
Date: Thu, 2 Mar 2023 17:00:19 -0500 (EST)

branch: elpa/git-commit
commit 410e4583e01b7fac31a4748e78f4c613859d3c41
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Enable navigating broken sections
    
    This suppresses one symptom of broken sections.  It does not guarantee
    that broken sections can always be navigated.
    
    Re #4181.
---
 lisp/magit-section.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index a6789d992b..a955603e69 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -1970,11 +1970,12 @@ current section."
     (setq section (magit-current-section)))
   (unless pos
     (setq pos (point)))
-  (and section
-       (>= pos (oref section start))
-       (<  pos (or (oref section content)
-                   (oref section end)))
-       t))
+  (ignore-errors ; Allow navigating broken sections.
+    (and section
+         (>= pos (oref section start))
+         (<  pos (or (oref section content)
+                     (oref section end)))
+         t)))
 
 (defun magit-section-internal-region-p (&optional section)
   "Return t if the region is active and inside SECTION's body.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]