Skip to content

Commit

Permalink
[fix]: Keymaps for the plugin itself were incorrectly saved
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Feb 3, 2024
1 parent 38030a9 commit edb312c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lua/LspUI/pos_abstract.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ local main_namespace = api.nvim_create_namespace("LspUI_main")
local seconday_namespace = api.nvim_create_namespace("LspUI_seconday")

-- key is buffer id, value is the map info
--- @type { [integer]: { [string]: any } }
local buffer_keymap_history = {}

-- function for push tagstack
Expand Down Expand Up @@ -194,10 +195,12 @@ local main_view_keybind = function()
true
)

buffer_keymap_history[M.main_view_buffer()] = {
[config.options.pos_keybind.main.back] = back_map,
[config.options.pos_keybind.main.hide_secondary] = hide_map,
}
if not buffer_keymap_history[M.main_view_buffer()] then
buffer_keymap_history[M.main_view_buffer()] = {
[config.options.pos_keybind.main.back] = back_map,
[config.options.pos_keybind.main.hide_secondary] = hide_map,
}
end

-- back keybind
api.nvim_buf_set_keymap(
Expand Down

0 comments on commit edb312c

Please sign in to comment.