branch: externals/objed
commit d50117d330a1c621050cb84e0d70ee110b443bfe
Author: Clemera <[email protected]>
Commit: Clemera <[email protected]>
Fix kill-op error
---
objed-objects.el | 4 ++--
objed.el | 4 +++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index 1fc0468..9a82ebd 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -586,8 +586,8 @@ to search backwards.
POS defaults to point. When no object is found at current
position returns the next accessible one in DIR. Object position
-order depends on `objed--obj-state'. To exit early from search objects
-can throw an error."
+order depends on `objed--obj-state'. To exit early from search
+objects can throw an error."
(save-excursion
(let ((darg (if dir :try-prev :try-next))
(max (if dir nil (objed--object :max-search-forward)))
diff --git a/objed.el b/objed.el
index b7f762e..fe4f182 100644
--- a/objed.el
+++ b/objed.el
@@ -2642,7 +2642,9 @@ Marked object sequences are merged to built a single text
object."
;; no marked objects
(objed--ob-apply op cmd (objed--current))
;; for possible repeats like default conf. (kill line...)
- (unless (eq op 'ignore)
+ (unless (or (eq op 'ignore)
+ ;; object gone
+ (not objed--current-obj))
(objed--change-to :beg (point)
:ibeg (point))))))