mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-14 01:50:27 +00:00
Merge pull request #93 from jesseleite/save-on-change-in-menu
Hook up `save_on_change` option to menu buffer
This commit is contained in:
commit
df1d9e5a3a
@ -81,6 +81,7 @@ M.toggle_quick_menu = function()
|
|||||||
|
|
||||||
local win_info = create_window()
|
local win_info = create_window()
|
||||||
local contents = {}
|
local contents = {}
|
||||||
|
local global_config = harpoon.get_global_settings()
|
||||||
|
|
||||||
Harpoon_win_id = win_info.win_id
|
Harpoon_win_id = win_info.win_id
|
||||||
Harpoon_bufh = win_info.bufnr
|
Harpoon_bufh = win_info.bufnr
|
||||||
@ -111,6 +112,14 @@ M.toggle_quick_menu = function()
|
|||||||
Harpoon_bufh
|
Harpoon_bufh
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
if global_config.save_on_change then
|
||||||
|
vim.cmd(
|
||||||
|
string.format(
|
||||||
|
"autocmd TextChanged,TextChangedI <buffer=%s> :lua require('harpoon.ui').on_menu_save()",
|
||||||
|
Harpoon_bufh
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
vim.cmd(
|
vim.cmd(
|
||||||
string.format(
|
string.format(
|
||||||
"autocmd BufModifiedSet <buffer=%s> set nomodified",
|
"autocmd BufModifiedSet <buffer=%s> set nomodified",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user