branch: externals/mpdired
commit 511f9d7c1a435411043d00b62b5b9287fc18aabe
Author: Manuel Giraud <[email protected]>
Commit: Manuel Giraud <[email protected]>
fix mark
Do not mark if there is no URI on this line.
---
mpdired.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/mpdired.el b/mpdired.el
index 311c5d1ba0..3b4b5ec6fa 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -713,12 +713,13 @@ an optional communication buffer."
(defun mpdired--mark (mark)
(let ((inhibit-read-only t))
- (save-excursion
- (goto-char (line-beginning-position))
- (delete-char 1)
- (insert-char mark))
- (put-text-property (mpdired--bol) (line-end-position) 'mark mark)
- (mpdired--reset-face)))
+ (when (get-text-property (mpdired--bol) 'uri)
+ (save-excursion
+ (goto-char (line-beginning-position))
+ (delete-char 1)
+ (insert-char mark))
+ (put-text-property (mpdired--bol) (line-end-position) 'mark mark)
+ (mpdired--reset-face))))
(defun mpdired--clear-mark ()
(let ((inhibit-read-only t)