[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ea9520a: Mark the end of file names correctly on Macos in wdired
From: |
Lars Ingebrigtsen |
Subject: |
master ea9520a: Mark the end of file names correctly on Macos in wdired |
Date: |
Tue, 4 Aug 2020 09:56:22 -0400 (EDT) |
branch: master
commit ea9520a7a23dfd66de30b04d0c5ff878fecfd3d2
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Mark the end of file names correctly on Macos in wdired
* lisp/wdired.el (wdired--restore-dired-filename-prop): Fix
problem with finding the end of the name on Macos.
---
lisp/wdired.el | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 768b8f5..b98becf 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -609,7 +609,10 @@ Optional arguments are ignored."
(defun wdired--restore-dired-filename-prop (beg end _len)
(save-match-data
(save-excursion
- (let ((lep (line-end-position)))
+ (let ((lep (line-end-position))
+ (used-F (dired-check-switches
+ dired-actual-switches
+ "F" "classify")))
(beginning-of-line)
(when (re-search-forward
directory-listing-before-filename-regexp lep t)
@@ -623,13 +626,17 @@ Optional arguments are ignored."
(and (re-search-backward
dired-permission-flags-regexp nil t)
(looking-at "l")
- (search-forward " -> " lep t))
+ ;; macOS and Ultrix adds "@" to the end
+ ;; of symlinks when using -F.
+ (if (and used-F
+ dired-ls-F-marks-symlinks)
+ (re-search-forward "@? -> " lep t)
+ (search-forward " -> " lep t)))
;; When dired-listing-switches includes "F"
;; or "classify", don't treat appended
;; indicator characters as part of the file
;; name (bug#34915).
- (and (dired-check-switches dired-actual-switches
- "F" "classify")
+ (and used-F
(re-search-forward "[*/@|=>]$" lep t)))
(goto-char (match-beginning 0))
lep))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ea9520a: Mark the end of file names correctly on Macos in wdired,
Lars Ingebrigtsen <=