Skip to content

Commit 83fe371

Browse files
committed
search for create when empty
1 parent 3ce69f3 commit 83fe371

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/dired/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ Browser.setup = function(state)
13721372
if current_buf == state.search_buf then
13731373
new_path = api.nvim_buf_get_lines(0, 0, -1, false)[1]
13741374
end
1375-
if current_buf == state.search_buf and #selected == 0 then
1375+
if current_buf == state.search_buf and (#selected == 0 or #state.entries == 0) then
13761376
new_path = vim.fs.normalize(new_path)
13771377
Actions.createAndEdit(state, new_path, vim.cmd.edit).fork(function(err)
13781378
Notify.err(err)

0 commit comments

Comments
 (0)