From 68d00cde999c8ba501483b255dd70ee397f4b087 Mon Sep 17 00:00:00 2001 From: Joshua Finch Date: Tue, 2 Apr 2024 09:42:44 -0500 Subject: [PATCH] Reverting the change as it affects Telekasten's search functions by preventing the floating window from opening. Further testing needed. --- nvim/lua/plugins/telescope.lua | 42 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index a600f8e..186bf3b 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -3,30 +3,30 @@ return { config = function(_, opts) local telescope = require('telescope') local actions = require('telescope.actions') - local action_state = require('telescope.actions.state') + -- local action_state = require('telescope.actions.state') local fb_actions = telescope.extensions.file_browser.actions - local custom_actions = {} + -- local custom_actions = {} - function custom_actions.grep_multi_select(prompt_bufnr) - local function get_table_size(t) - local count = 0 - for _ in pairs(t) do - count = count + 1 - end - return count - end + -- function custom_actions.grep_multi_select(prompt_bufnr) + -- local function get_table_size(t) + -- local count = 0 + -- for _ in pairs(t) do + -- count = count + 1 + -- end + -- return count + -- end - local picker = action_state.get_current_picker(prompt_bufnr) - local num_selections = get_table_size(picker:get_multi_selection()) + -- local picker = action_state.get_current_picker(prompt_bufnr) + -- local num_selections = get_table_size(picker:get_multi_selection()) - if num_selections > 1 then - actions.send_selected_to_qflist(prompt_bufnr) - actions.open_qflist() - else - actions.file_edit(prompt_bufnr) - end - end + -- if num_selections > 1 then + -- actions.send_selected_to_qflist(prompt_bufnr) + -- actions.open_qflist() + -- else + -- actions.file_edit(prompt_bufnr) + -- end + -- end opts.defaults = { file_ignore_patterns = { @@ -43,11 +43,11 @@ return { layout_strategy = 'horizontal', mappings = { n = { - [''] = custom_actions.grep_multi_select, + -- [''] = custom_actions.grep_multi_select, }, i = { [''] = actions.close, - [''] = custom_actions.grep_multi_select, + -- [''] = custom_actions.grep_multi_select, }, }, prompt_prefix = '  ',