Skip to content

Conversation

@mikew
Copy link
Owner

@mikew mikew commented Sep 4, 2024

No description provided.

Comment on lines +202 to +206
-- ... or if we do have a window but don't have a buffer, we use the buffer
-- of the window.
if winid ~= -1 and bufnr == -1 then
bufnr = vim.api.nvim_win_get_buf(winid)
end
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels "technically correct": when .open is called, and somehow there is a window that belongs to the drawer but it doesn't contain a known buffer, that buffer is used.

The controversial / potential bugs bit is the fact that it happens after the logic for should_reuse_previous_bufnr happens, and that logic very intentionally defaults back to -1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant