We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d52fdeb commit e13ac90Copy full SHA for e13ac90
lua/nvim-tree/marks/bulk-move.lua
@@ -3,6 +3,7 @@ local core = require "nvim-tree.core"
3
local utils = require "nvim-tree.utils"
4
local rename_file = require "nvim-tree.actions.fs.rename-file"
5
local notify = require "nvim-tree.notify"
6
+local lib = require "nvim-tree.lib"
7
8
local M = {
9
config = {},
@@ -14,9 +15,18 @@ function M.bulk_move()
14
15
return
16
end
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
27
local input_opts = {
28
prompt = "Move to: ",
- default = core.get_cwd(),
29
+ default = default_path,
30
completion = "dir",
31
}
32
0 commit comments