File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ local core = require "nvim-tree.core"
33local utils = require " nvim-tree.utils"
44local rename_file = require " nvim-tree.actions.fs.rename-file"
55local notify = require " nvim-tree.notify"
6+ local lib = require " nvim-tree.lib"
67
78local M = {
89 config = {},
@@ -14,9 +15,18 @@ function M.bulk_move()
1415 return
1516 end
1617
18+ local node_at_cursor = lib .get_node_at_cursor ()
19+ local default_path = core .get_cwd ()
20+
21+ if node_at_cursor and node_at_cursor .type ~= " directory" then
22+ default_path = node_at_cursor .parent .absolute_path
23+ elseif node_at_cursor then
24+ default_path = node_at_cursor .absolute_path
25+ end
26+
1727 local input_opts = {
1828 prompt = " Move to: " ,
19- default = core . get_cwd () ,
29+ default = default_path ,
2030 completion = " dir" ,
2131 }
2232
You can’t perform that action at this time.
0 commit comments