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

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

[elpa] externals/objed 71dc168 135/166: Fix skipping object when one cha


From: Clemens Radermacher
Subject: [elpa] externals/objed 71dc168 135/166: Fix skipping object when one char before it
Date: Sun, 29 Dec 2019 08:21:15 -0500 (EST)

branch: externals/objed
commit 71dc16867945581d661d183a04b87e4f7cdf990f
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Fix skipping object when one char before it
---
 objed-objects.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/objed-objects.el b/objed-objects.el
index e9ddb4f..d2f415d 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -792,9 +792,13 @@ objects can throw an error."
                  (let ((f (if dir  '> '<))
                        (step (if dir -1 1)))
                    (unless (funcall stop)
-                     (forward-char step)
                      (let ((pos (point)))
                        (objed--object darg)
+                       ;; if point has not moved
+                       ;; fallback to move one char
+                       ;; in right direction
+                       (when (= (point) pos)
+                         (forward-char step))
                        ;; check for valid move direction to avoid inf. loop if
                        ;; the code of object misbehaves
                        (when (funcall f (point) pos)
@@ -2622,7 +2626,6 @@ non-nil the indentation block can contain empty lines."
 (objed-define-object nil error
   :get-obj
   (objed--get-error-bounds)
-  ;; TODO: search for next same face as current...
   :try-next
   (objed--next-error)
   :try-prev



reply via email to

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