From a6c883ce362fb77a83b2119231b655ddc7eafeea Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Fri, 4 Sep 2020 11:01:10 -0400 Subject: [PATCH] breaking: change attach_mappings to take bufnr as first argument --- lua/telescope/builtin.lua | 2 +- lua/telescope/mappings.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua index f96fa97..75421e0 100644 --- a/lua/telescope/builtin.lua +++ b/lua/telescope/builtin.lua @@ -254,7 +254,7 @@ builtin.command_history = function(opts) finder = finders.new_table(results), sorter = sorters.get_norcalli_sorter(), - attach_mappings = function(map) + attach_mappings = function(_, map) map('i', '', actions.set_command_line) -- TODO: Find a way to insert the text... it seems hard. diff --git a/lua/telescope/mappings.lua b/lua/telescope/mappings.lua index 6c8641c..001e0b0 100644 --- a/lua/telescope/mappings.lua +++ b/lua/telescope/mappings.lua @@ -103,7 +103,7 @@ mappings.apply_keymap = function(prompt_bufnr, attach_mappings, buffer_keymap) telescope_map(prompt_bufnr, mode, key_bind, key_func, opts) end - if attach_mappings and not attach_mappings(map) then + if attach_mappings and not attach_mappings(prompt_bufnr, map) then return end