Skip to content

Commit 84ec617

Browse files
committed
update
1 parent b243296 commit 84ec617

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lua/dired/init.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,10 @@ Browser.setup = function(state)
13681368
Actions.openDirectory(state, new_path).run()
13691369
elseif PathOps.isFile(new_path) then
13701370
Actions.openFile(state, new_path, vim.cmd.edit)
1371-
elseif current_buf == state.search_buf then
1371+
elseif
1372+
current_buf == state.search_buf
1373+
and vim.tbl_isempty(api.nvim_buf_get_lines(state.buf, 0, -1, false))
1374+
then
13721375
Actions.createAndEdit(state, new_path, vim.cmd.edit).fork(function(err)
13731376
Notify.err(err)
13741377
end, function() end)

0 commit comments

Comments
 (0)