]> git.eshelyaron.com Git - emacs.git/commitdiff
Make 'dired-hide-details-mode' work after 'dired-hide-subdir'
authorGabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Sat, 5 Nov 2022 11:27:50 +0000 (08:27 -0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 10 Nov 2022 10:05:59 +0000 (12:05 +0200)
* lisp/dired.el (dired--unhide): Restore text properties.
(Bug#59047)

* test/lisp/dired-tests.el (dired-test-bugXXXX): New test.

lisp/dired.el
test/lisp/dired-tests.el

index 209e270942b96a3fccc47d0bf1e382677f0f2d01..825d0e475085900e144425e366780bdc0948d1cc 100644 (file)
@@ -3034,7 +3034,8 @@ See options: `dired-hide-details-hide-symlink-targets' and
       (remove-list-of-text-properties
        (progn (goto-char start) (line-end-position))
        (progn (goto-char end) (line-end-position))
-       '(invisible)))))
+       '(invisible))
+      (dired-insert-set-properties start end))))
 
 ;;; Functions for finding the file name in a dired buffer line
 
index 09becc7fe7ae2dd5e7138760fd01de23624f8964..fd7ff73267e180cd3993f8249ff809d470556b13 100644 (file)
             (should (cdr (dired-get-marked-files))))
         (when (buffer-live-p buf) (kill-buffer buf))))))
 
+(ert-deftest dired-test-bugXXXX ()
+  "Test for https://debbugs.gnu.org/XXXX ."
+  (dired (list (expand-file-name "src" source-directory)
+               "cygw32.c" "alloc.c" "w32xfns.c" "xdisp.c"))
+  (dired-hide-all)
+  (dired-hide-all)
+  (dired-next-line 1)
+  (should (equal 'dired-hide-details-detail
+                 (get-text-property (1+ (line-beginning-position)) 'invisible))))
+
 (ert-deftest dired-test-bug27899 ()
   "Test for https://debbugs.gnu.org/27899 ."
   :tags '(:unstable)