Skip to content

Commit

Permalink
Merge f6a25c5 into 38abe36
Browse files Browse the repository at this point in the history
  • Loading branch information
gvol committed Apr 7, 2024
2 parents 38abe36 + f6a25c5 commit 7c0fbc4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deadgrep.el
Original file line number Diff line number Diff line change
Expand Up @@ -1262,13 +1262,16 @@ Keys are interned filenames, so they compare with `eq'.")
(defun deadgrep-toggle-all-file-results ()
"Show/hide the results of all files."
(interactive)
(let ((should-show (cl-some #'cdr deadgrep--hidden-files)))
(let ((should-show (cl-some #'cdr deadgrep--hidden-files))
(seen-files nil))
(save-excursion
(goto-char (point-min))
(while (not (eq (point) (point-max)))
(goto-char (or (next-single-property-change (point) 'deadgrep-filename)
(point-max)))
(when (deadgrep--filename)
(when (and (deadgrep--filename)
(not (member (deadgrep--filename) seen-files)))
(push (deadgrep--filename) seen-files)
(if should-show
(deadgrep--show)
(deadgrep--hide)))))))
Expand Down

0 comments on commit 7c0fbc4

Please sign in to comment.