feat(buffer): open as bottom-drawer split like fugitive

Problem: :Pending replaced the current buffer, making it impossible to
view tasks alongside the file being edited. No way to close the drawer
without :q or switching buffers manually.

Solution: open the task buffer in a botright horizontal split instead of
replacing the current buffer. Track the drawer window ID so re-opening
focuses it rather than creating a second split. Set winfixheight so the
drawer keeps its height when other windows open or close. Add q/<Esc>
mappings to close the drawer, and a WinClosed autocmd to clear the
tracked window ID when the user closes it manually. Add drawer_height
config option (default 15).
This commit is contained in:
Barrett Ruth 2026-02-25 09:24:04 -05:00
parent 5db242a9cf
commit b379b3cf13
3 changed files with 47 additions and 14 deletions

View file

@ -9,6 +9,7 @@
---@field date_format string
---@field date_syntax string
---@field category_order? string[]
---@field drawer_height integer
---@field gcal? pending.GcalConfig
---@class pending.config
@ -22,6 +23,7 @@ local defaults = {
date_format = '%b %d',
date_syntax = 'due',
category_order = {},
drawer_height = 15,
}
---@type pending.Config?