Fix: check for Untitled existing
parent
0436ae9135
commit
abd7fb8bd4
|
|
@ -91,7 +91,7 @@ local function cd_project_in_tab(dir)
|
||||||
|
|
||||||
vim.fn.execute("tabe | tcd " .. vim.fn.fnameescape(dir))
|
vim.fn.execute("tabe | tcd " .. vim.fn.fnameescape(dir))
|
||||||
|
|
||||||
if vim.fn.bufnr("Untitled") == -1 then
|
if vim.fn.bufnr("Untitled") ~= -1 then
|
||||||
vim.api.nvim_command("bdelete! Untitled")
|
vim.api.nvim_command("bdelete! Untitled")
|
||||||
end
|
end
|
||||||
vim.api.nvim_command("%bdelete")
|
vim.api.nvim_command("%bdelete")
|
||||||
|
|
@ -112,7 +112,7 @@ local function cd_project(dir)
|
||||||
|
|
||||||
vim.fn.execute("cd " .. vim.fn.fnameescape(dir))
|
vim.fn.execute("cd " .. vim.fn.fnameescape(dir))
|
||||||
|
|
||||||
if vim.fn.bufnr("Untitled") == -1 then
|
if vim.fn.bufnr("Untitled") ~= -1 then
|
||||||
vim.api.nvim_command("bdelete! Untitled")
|
vim.api.nvim_command("bdelete! Untitled")
|
||||||
end
|
end
|
||||||
vim.api.nvim_command("%bdelete")
|
vim.api.nvim_command("%bdelete")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue