justinmk / vim-dirvish

Directory viewer for Vim :zap:
Other
1.19k stars 64 forks source link

Weird behavior when directory is opened with vim.cmd (Neovim's Lua API) #215

Closed gbrlsnchs closed 2 years ago

gbrlsnchs commented 2 years ago

I'm using a nightly release of Neovim.

Steps to reproduce:

  1. Open any text buffer
  2. Execute lua vim.cmd("vsplit +edit ./a/directory/path")

Expected: It should open the buffer normally, displaying the directory's content, just like it does when running :vsplit +edit ./a/directory/path directly.

Actual result: It opens the buffer, but doesn't display its contents. If you hit R or move out the window and in again, then it shows the directory's content.

justinmk commented 2 years ago

Looks like a nvim_exec doesn't execute autocmds...

justinmk commented 2 years ago

seems to work now (tested nvim ca64b589cd74 ), can you confirm?