Reverting the change as it affects Telekasten's search functions by preventing the floating window from opening. Further testing needed.
This commit is contained in:
parent
70ff57b800
commit
68d00cde99
@ -3,30 +3,30 @@ return {
|
|||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
local telescope = require('telescope')
|
local telescope = require('telescope')
|
||||||
local actions = require('telescope.actions')
|
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 fb_actions = telescope.extensions.file_browser.actions
|
||||||
|
|
||||||
local custom_actions = {}
|
-- local custom_actions = {}
|
||||||
|
|
||||||
function custom_actions.grep_multi_select(prompt_bufnr)
|
-- function custom_actions.grep_multi_select(prompt_bufnr)
|
||||||
local function get_table_size(t)
|
-- local function get_table_size(t)
|
||||||
local count = 0
|
-- local count = 0
|
||||||
for _ in pairs(t) do
|
-- for _ in pairs(t) do
|
||||||
count = count + 1
|
-- count = count + 1
|
||||||
end
|
-- end
|
||||||
return count
|
-- return count
|
||||||
end
|
-- end
|
||||||
|
|
||||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
-- local picker = action_state.get_current_picker(prompt_bufnr)
|
||||||
local num_selections = get_table_size(picker:get_multi_selection())
|
-- local num_selections = get_table_size(picker:get_multi_selection())
|
||||||
|
|
||||||
if num_selections > 1 then
|
-- if num_selections > 1 then
|
||||||
actions.send_selected_to_qflist(prompt_bufnr)
|
-- actions.send_selected_to_qflist(prompt_bufnr)
|
||||||
actions.open_qflist()
|
-- actions.open_qflist()
|
||||||
else
|
-- else
|
||||||
actions.file_edit(prompt_bufnr)
|
-- actions.file_edit(prompt_bufnr)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
opts.defaults = {
|
opts.defaults = {
|
||||||
file_ignore_patterns = {
|
file_ignore_patterns = {
|
||||||
@ -43,11 +43,11 @@ return {
|
|||||||
layout_strategy = 'horizontal',
|
layout_strategy = 'horizontal',
|
||||||
mappings = {
|
mappings = {
|
||||||
n = {
|
n = {
|
||||||
['<cr>'] = custom_actions.grep_multi_select,
|
-- ['<cr>'] = custom_actions.grep_multi_select,
|
||||||
},
|
},
|
||||||
i = {
|
i = {
|
||||||
['<ESC>'] = actions.close,
|
['<ESC>'] = actions.close,
|
||||||
['<cr>'] = custom_actions.grep_multi_select,
|
-- ['<cr>'] = custom_actions.grep_multi_select,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
prompt_prefix = ' ',
|
prompt_prefix = ' ',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user