Skip to content

Commit

Permalink
Preserve skip settings across searches
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Nov 30, 2024
1 parent 2f4ac50 commit 5b19e21
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions deadgrep.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 5b19e21

Please sign in to comment.