* feat: Focus file after creation * feat: Focus file after pasting --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
parent
71e1c5bdc2
commit
061a05bfd9
@ -5,6 +5,8 @@ local core = require "nvim-tree.core"
|
||||
local events = require "nvim-tree.events"
|
||||
local notify = require "nvim-tree.notify"
|
||||
|
||||
local find_file = require("nvim-tree.actions.finders.find-file").fn
|
||||
|
||||
local M = {}
|
||||
|
||||
local clipboard = {
|
||||
@ -91,6 +93,8 @@ local function do_single_paste(source, dest, action_type, action_fn)
|
||||
notify.error("Could not " .. action_type .. " " .. source .. " - " .. (errmsg or "???"))
|
||||
return false, errmsg
|
||||
end
|
||||
|
||||
find_file(utils.path_remove_trailing(dest))
|
||||
end
|
||||
|
||||
if dest_stats then
|
||||
|
||||
@ -3,6 +3,8 @@ local utils = require "nvim-tree.utils"
|
||||
local events = require "nvim-tree.events"
|
||||
local notify = require "nvim-tree.notify"
|
||||
|
||||
local find_file = require("nvim-tree.actions.finders.find-file").fn
|
||||
|
||||
local M = {}
|
||||
|
||||
local ALLOWED_MODIFIERS = {
|
||||
@ -84,6 +86,8 @@ function M.fn(default_modifier)
|
||||
if M.enable_reload then
|
||||
require("nvim-tree.actions.reloaders.reloaders").reload_explorer()
|
||||
end
|
||||
|
||||
find_file(utils.path_remove_trailing(new_file_path))
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user