From 5b19e219be9319f94a05ce964167a0ffbccf56b9 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sat, 30 Nov 2024 22:18:49 +0000 Subject: [PATCH] Preserve skip settings across searches --- deadgrep.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/deadgrep.el b/deadgrep.el index a9eb5a2..fb43af3 100644 --- a/deadgrep.el +++ b/deadgrep.el @@ -1698,12 +1698,17 @@ don't actually start the search." (buffer-file-name)))) (last-results-buf (car-safe (deadgrep--buffers))) prev-search-type - prev-search-case) + prev-search-case + prev-skip-if-hidden + prev-skip-if-vcs-ignore) ;; Find out what search settings were used last time. (when last-results-buf + ;; here certainly (with-current-buffer last-results-buf (setq prev-search-type deadgrep--search-type) - (setq prev-search-case deadgrep--search-case))) + (setq prev-search-case deadgrep--search-case) + (setq prev-skip-if-hidden deadgrep--skip-if-hidden) + (setq prev-skip-if-vcs-ignore deadgrep--skip-if-vcs-ignore))) (funcall deadgrep-display-buffer-function buf) @@ -1716,7 +1721,9 @@ don't actually start the search." ;; search results buffer. (when last-results-buf (setq deadgrep--search-type prev-search-type) - (setq deadgrep--search-case prev-search-case)) + (setq deadgrep--search-case prev-search-case) + (setq deadgrep--skip-if-hidden prev-skip-if-hidden) + (setq deadgrep--skip-if-vcs-ignore prev-skip-if-vcs-ignore)) (deadgrep--write-heading)