breaking: change attach_mappings to take bufnr as first argument
This commit is contained in:
@@ -254,7 +254,7 @@ builtin.command_history = function(opts)
|
|||||||
finder = finders.new_table(results),
|
finder = finders.new_table(results),
|
||||||
sorter = sorters.get_norcalli_sorter(),
|
sorter = sorters.get_norcalli_sorter(),
|
||||||
|
|
||||||
attach_mappings = function(map)
|
attach_mappings = function(_, map)
|
||||||
map('i', '<CR>', actions.set_command_line)
|
map('i', '<CR>', actions.set_command_line)
|
||||||
|
|
||||||
-- TODO: Find a way to insert the text... it seems hard.
|
-- TODO: Find a way to insert the text... it seems hard.
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ mappings.apply_keymap = function(prompt_bufnr, attach_mappings, buffer_keymap)
|
|||||||
telescope_map(prompt_bufnr, mode, key_bind, key_func, opts)
|
telescope_map(prompt_bufnr, mode, key_bind, key_func, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
if attach_mappings and not attach_mappings(map) then
|
if attach_mappings and not attach_mappings(prompt_bufnr, map) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user