fix(#2132): focus file after rename and paste (#2151)

* feat: Focus file after creation

* feat: Focus file after pasting

---------

Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
baahrens
2023-04-23 05:59:16 +02:00
committed by GitHub
parent 71e1c5bdc2
commit 061a05bfd9
2 changed files with 8 additions and 0 deletions

View File

@@ -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