Remove sleep; that didn't work. Add force delete Untitled buffer before deleteing all other buffers
parent
8ef4cd0fdc
commit
bf18665ad4
|
|
@ -88,11 +88,11 @@ local function cd_project_in_tab(dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
require("persistence").save()
|
require("persistence").save()
|
||||||
vim.cmd("sleep100m")
|
|
||||||
|
|
||||||
vim.fn.execute("tabe | tcd " .. vim.fn.fnameescape(dir))
|
vim.fn.execute("tabe | tcd " .. vim.fn.fnameescape(dir))
|
||||||
|
|
||||||
vim.api.nvim_command("%bd")
|
vim.api.nvim_command("bdelete! Untitled")
|
||||||
|
vim.api.nvim_command("%bdelete")
|
||||||
require("persistence").load()
|
require("persistence").load()
|
||||||
local hooks = cd_hooks.get_hooks(vim.g.cd_project_config.hooks, dir, "AFTER_CD")
|
local hooks = cd_hooks.get_hooks(vim.g.cd_project_config.hooks, dir, "AFTER_CD")
|
||||||
|
|
||||||
|
|
@ -107,11 +107,11 @@ local function cd_project(dir)
|
||||||
vim.g.cd_project_current_project = dir
|
vim.g.cd_project_current_project = dir
|
||||||
|
|
||||||
require("persistence").save()
|
require("persistence").save()
|
||||||
vim.cmd("sleep100m")
|
|
||||||
|
|
||||||
vim.fn.execute("cd " .. vim.fn.fnameescape(dir))
|
vim.fn.execute("cd " .. vim.fn.fnameescape(dir))
|
||||||
|
|
||||||
vim.api.nvim_command("%bd")
|
vim.api.nvim_command("bdelete! Untitled")
|
||||||
|
vim.api.nvim_command("%bdelete")
|
||||||
require("persistence").load()
|
require("persistence").load()
|
||||||
|
|
||||||
local hooks = cd_hooks.get_hooks(vim.g.cd_project_config.hooks, dir, "AFTER_CD")
|
local hooks = cd_hooks.get_hooks(vim.g.cd_project_config.hooks, dir, "AFTER_CD")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue