aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/wdired.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 768b8f597b4..b98becfafe7 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -609,7 +609,10 @@ Optional arguments are ignored."
609(defun wdired--restore-dired-filename-prop (beg end _len) 609(defun wdired--restore-dired-filename-prop (beg end _len)
610 (save-match-data 610 (save-match-data
611 (save-excursion 611 (save-excursion
612 (let ((lep (line-end-position))) 612 (let ((lep (line-end-position))
613 (used-F (dired-check-switches
614 dired-actual-switches
615 "F" "classify")))
613 (beginning-of-line) 616 (beginning-of-line)
614 (when (re-search-forward 617 (when (re-search-forward
615 directory-listing-before-filename-regexp lep t) 618 directory-listing-before-filename-regexp lep t)
@@ -623,13 +626,17 @@ Optional arguments are ignored."
623 (and (re-search-backward 626 (and (re-search-backward
624 dired-permission-flags-regexp nil t) 627 dired-permission-flags-regexp nil t)
625 (looking-at "l") 628 (looking-at "l")
626 (search-forward " -> " lep t)) 629 ;; macOS and Ultrix adds "@" to the end
630 ;; of symlinks when using -F.
631 (if (and used-F
632 dired-ls-F-marks-symlinks)
633 (re-search-forward "@? -> " lep t)
634 (search-forward " -> " lep t)))
627 ;; When dired-listing-switches includes "F" 635 ;; When dired-listing-switches includes "F"
628 ;; or "classify", don't treat appended 636 ;; or "classify", don't treat appended
629 ;; indicator characters as part of the file 637 ;; indicator characters as part of the file
630 ;; name (bug#34915). 638 ;; name (bug#34915).
631 (and (dired-check-switches dired-actual-switches 639 (and used-F
632 "F" "classify")
633 (re-search-forward "[*/@|=>]$" lep t))) 640 (re-search-forward "[*/@|=>]$" lep t)))
634 (goto-char (match-beginning 0)) 641 (goto-char (match-beginning 0))
635 lep)) 642 lep))