File tree 1 file changed +11
-1
lines changed
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"
3
3
local utils = require " nvim-tree.utils"
4
4
local rename_file = require " nvim-tree.actions.fs.rename-file"
5
5
local notify = require " nvim-tree.notify"
6
+ local lib = require " nvim-tree.lib"
6
7
7
8
local M = {
8
9
config = {},
@@ -14,9 +15,18 @@ function M.bulk_move()
14
15
return
15
16
end
16
17
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
+
17
27
local input_opts = {
18
28
prompt = " Move to: " ,
19
- default = core . get_cwd () ,
29
+ default = default_path ,
20
30
completion = " dir" ,
21
31
}
22
32
You can’t perform that action at this time.
0 commit comments