Skip to content

Commit

Permalink
pass the mode to mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Feb 4, 2025
1 parent 7edfb16 commit 17bdb91
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lua/octo/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1658,11 +1658,8 @@ function M.apply_mappings(kind, bufnr)
value.desc = ""
end
local mapping_opts = { silent = true, noremap = true, buffer = bufnr, desc = value.desc }
vim.keymap.set("n", value.lhs, mappings[action], mapping_opts)
-- TODO: These should probably be part of the config
if action == "add_review_comment" or action == "add_review_suggestion" then
vim.keymap.set("x", value.lhs, mappings[action], mapping_opts)
end
local mode = value.mode or "n"
vim.keymap.set(mode, value.lhs, mappings[action], mapping_opts)
end
end
end
Expand Down

0 comments on commit 17bdb91

Please sign in to comment.