From af78ba3b7da51ea5780bdb2c4b990ae2ea2ce716 Mon Sep 17 00:00:00 2001 From: ash <153942603+xz47sv@users.noreply.github.com> Date: Tue, 25 Jun 2024 03:13:53 +0000 Subject: [PATCH] fix(builtin): grep/treesitter push cursor on edit (#3175) * fix(builtin.live_grep, builtin.treesitter): not adding jumps to jumplist Whenever a picker, that can jump to a different location in the same buffer does so it should have `push_cursor_on_edit` otherwise the jump won't be recorded. Maybe this affects other pickers too, but I only noticed it on grep and treesitter since I use those two a lot. * fix(builtin.grep_string): not adding jumps to jumplist --- lua/telescope/builtin/__files.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/telescope/builtin/__files.lua b/lua/telescope/builtin/__files.lua index 2a3f2ce..d31b9a6 100644 --- a/lua/telescope/builtin/__files.lua +++ b/lua/telescope/builtin/__files.lua @@ -180,6 +180,7 @@ files.live_grep = function(opts) map("i", "", actions.to_fuzzy_refine) return true end, + push_cursor_on_edit = true, }) :find() end @@ -257,6 +258,7 @@ files.grep_string = function(opts) finder = finders.new_oneshot_job(args, opts), previewer = conf.grep_previewer(opts), sorter = conf.generic_sorter(opts), + push_cursor_on_edit = true, }) :find() end @@ -460,6 +462,7 @@ files.treesitter = function(opts) tag = "kind", sorter = conf.generic_sorter(opts), }, + push_cursor_on_edit = true, }) :find() end