From 1e0f6fa335c72c05d1d3635120c572e198e5ae0d Mon Sep 17 00:00:00 2001 From: Eugene Oliveros Date: Thu, 11 Jul 2024 20:47:20 +0800 Subject: [PATCH] fix: enable winfixbuf to prevent accidental buffer changes --- lua/gitpad/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/gitpad/init.lua b/lua/gitpad/init.lua index dc034bc..ea8f4c2 100644 --- a/lua/gitpad/init.lua +++ b/lua/gitpad/init.lua @@ -182,6 +182,7 @@ function M.open_window(opts) vim.api.nvim_set_option_value('filetype', 'markdown', { buf = bufnr }) vim.api.nvim_set_option_value('buflisted', false, { buf = bufnr }) + vim.api.nvim_set_option_value('winfixbuf', true, { win = gitpad_win_id }) if win_opts['relative'] then vim.api.nvim_set_option_value(