fix: nop i_<c-j> because we dont want allow new line (#2147)

This commit is contained in:
Simon Hauser
2022-09-03 11:22:26 +02:00
committed by GitHub
parent b923665e64
commit 49b043e2a3
2 changed files with 6 additions and 1 deletions

View File

@@ -1128,7 +1128,7 @@ actions.which_key = function(prompt_bufnr, opts)
name = name == "" and action or name .. " + " .. action name = name == "" and action or name .. " + " .. action
end end
end end
if name and name ~= "which_key" then if name and name ~= "which_key" and name ~= "nop" then
if not opts.only_show_current_mode or mode == v.mode then if not opts.only_show_current_mode or mode == v.mode then
table.insert(mappings, { mode = v.mode, keybind = v.keybind, name = name }) table.insert(mappings, { mode = v.mode, keybind = v.keybind, name = name })
end end
@@ -1289,6 +1289,8 @@ actions.to_fuzzy_refine = function(prompt_bufnr)
}) })
end end
actions.nop = function(_) end
-- ================================================== -- ==================================================
-- Transforms modules and sets the correct metatables. -- Transforms modules and sets the correct metatables.
-- ================================================== -- ==================================================

View File

@@ -157,6 +157,9 @@ mappings.default_mappings = config.values.default_mappings
["<C-/>"] = actions.which_key, ["<C-/>"] = actions.which_key,
["<C-_>"] = actions.which_key, -- keys from pressing <C-/> ["<C-_>"] = actions.which_key, -- keys from pressing <C-/>
["<C-w>"] = { "<c-s-w>", type = "command" }, ["<C-w>"] = { "<c-s-w>", type = "command" },
-- disable c-j because we dont want to allow new lines #2123
["<C-j>"] = actions.nop,
}, },
n = { n = {