Skip to content

Commit

Permalink
refactor!: make scratch buffer if deleting last buffer
Browse files Browse the repository at this point in the history
Previously, buffer would be listed and non-scratch.
  • Loading branch information
willothy committed Jul 16, 2023
1 parent 904dc18 commit 368cd3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/cokeline/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ local function buf_del_impl(bufnr, focus_next, wipeout, force)
end
else
-- If there's no possible switch target, create a new buffer and switch to it
switch_target = vim.api.nvim_create_buf(true, false)
switch_target = vim.api.nvim_create_buf(false, true)
if switch_target == 0 then
vim.api.nvim_err_writeln("Failed to create new buffer")
end
Expand Down

0 comments on commit 368cd3e

Please sign in to comment.