branch: externals/mpdired
commit 64abed57c6b81270c47791b427ef931cd939c55b
Author: Manuel Giraud <[email protected]>
Commit: Manuel Giraud <[email protected]>
fix a bug with deletion on last line
---
mpdired.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/mpdired.el b/mpdired.el
index a7e3a23f63..f38b89fa79 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -722,8 +722,10 @@
(when id
(save-excursion
(forward-line)
- (setq mpdired--songid-point
- (get-text-property (mpdired--bol) 'id)))
+ (let ((bol (mpdired--bol)))
+ (unless (>= bol (point-max))
+ (setq mpdired--songid-point
+ (get-text-property bol 'id)))))
(mpdired-deleteid-internal id))))
(defun mpdired-delete ()
@@ -737,7 +739,8 @@
(while (and (< (point) max)
(get-text-property (mpdired--bol) 'mark))
(forward-line))
- (get-text-property (mpdired--bol) 'id))))
+ (unless (>= (mpdired--bol) max)
+ (get-text-property (mpdired--bol) 'id)))))
(defun mpdired-flagged-delete ()
(interactive)