diff --git a/lua/telescope/_extensions/tasks.lua b/lua/telescope/_extensions/tasks.lua index d3e2f57..0f6273d 100644 --- a/lua/telescope/_extensions/tasks.lua +++ b/lua/telescope/_extensions/tasks.lua @@ -48,8 +48,8 @@ local define_preview = function(self, entry, _) end local attach_mappings = function(_, map) - map("i", "", function() require "tasks".run(action_state.get_selected_entry().value.name) end) - map("n", "", function() require "tasks".run(action_state.get_selected_entry().value.name) end) + map("i", "", function() require "tasks".run(action_state.get_selected_entry().value.name, vim.fn.bufnr("#")) end) + map("n", "", function() require "tasks".run(action_state.get_selected_entry().value.name, vim.fn.bufnr("#")) end) map("i", "", function() require "tasks".open(action_state.get_selected_entry().value.name) end) map("n", "", function() require "tasks".open(action_state.get_selected_entry().value.name) end)