diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-17 09:49:07 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-17 09:49:07 +0900 |
| commit | 8cbe130c6310b1e4a313ec7e611f534c3175d1e8 (patch) | |
| tree | f3519ec4d30ffc67d3f54f6748b7b6ea56f554bc /ar/.config | |
| parent | 86445b608698640341953c43d386476f08e97352 (diff) | |
modified plugins/goyo.lua
Diffstat (limited to 'ar/.config')
| -rw-r--r-- | ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/goyo.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/goyo.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/goyo.lua index 86b9a03..dda358b 100644 --- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/goyo.lua +++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/goyo.lua @@ -33,6 +33,24 @@ return { ":Goyo|q!<CR>", { noremap = true, silent = true, desc = "Goyo abort" } ) + -- Goyo creates multiple padding windows. + -- Use a global (non-buffer-local) QuitPre so it fires regardless of which window is active. + local mutt_quit_group = vim.api.nvim_create_augroup("TheSiahxyz_mutt_quit", { clear = true }) + vim.api.nvim_create_autocmd("QuitPre", { + group = mutt_quit_group, + once = true, + callback = function() + vim.cmd("qa!") + end, + }) + -- Clean up the global QuitPre if the buffer is deleted without quitting + vim.api.nvim_create_autocmd("BufDelete", { + buffer = 0, + once = true, + callback = function() + pcall(vim.api.nvim_del_augroup_by_id, mutt_quit_group) + end, + }) end, }) end, |
