We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b243296 commit 84ec617Copy full SHA for 84ec617
1 file changed
lua/dired/init.lua
@@ -1368,7 +1368,10 @@ Browser.setup = function(state)
1368
Actions.openDirectory(state, new_path).run()
1369
elseif PathOps.isFile(new_path) then
1370
Actions.openFile(state, new_path, vim.cmd.edit)
1371
- elseif current_buf == state.search_buf then
+ elseif
1372
+ current_buf == state.search_buf
1373
+ and vim.tbl_isempty(api.nvim_buf_get_lines(state.buf, 0, -1, false))
1374
+ then
1375
Actions.createAndEdit(state, new_path, vim.cmd.edit).fork(function(err)
1376
Notify.err(err)
1377
end, function() end)
0 commit comments