From 7f4566b1baed2c1646f896ae895276d9170d90bb Mon Sep 17 00:00:00 2001 From: Oliver Taylor <1388093+olivertaylor@users.noreply.github.com> Date: Thu, 18 Feb 2021 21:54:28 -0800 Subject: [PATCH] Tweaks ctrlf config based on raxod502 feedback https://github.com/raxod502/ctrlf/issues/84#issuecomment-781790870 --- emacs/init.el | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index f25abdb..4f44370 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -927,20 +927,13 @@ This simply removes the hooked added by the function `use-embark-completions'." (use-package ctrlf :init - (defun oht-ctrlf-push-region () - "Push the region to ctrlf's `last-input' variable." - (interactive) - (if (use-region-p) - (setq ctrlf--last-input (buffer-substring (region-beginning) (region-end))) - (error "No active region"))) (defun oht-ctrlf-forward-fuzzy () "Call `ctrlf-forward-fuzzy' with last-input." (interactive) - (ctrlf-forward 'fuzzy nil ctrlf--last-input) + (ctrlf-forward 'fuzzy nil (car ctrlf-search-history)) ) :bind - ;; ("C-M-s" . oht-ctrlf-push-region) - ("C-s" . ctrlf-forward-fuzzy) + ("C-s" . oht-ctrlf-forward-fuzzy) ("C-r" . ctrlf-backward-fuzzy) :config (setq ctrlf-go-to-end-of-match nil)