Skip to content

Commit f9a0c3c

Browse files
committed
fix(#1723): find-file refresh containing folder prior to searching
1 parent 7e89276 commit f9a0c3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/nvim-tree/actions/finders/find-file.lua

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local view = require "nvim-tree.view"
33
local utils = require "nvim-tree.utils"
44
local renderer = require "nvim-tree.renderer"
55
local core = require "nvim-tree.core"
6+
local watch = require "nvim-tree.explorer.watch"
67
local Iterator = require "nvim-tree.iterators.node-iterator"
78

89
local M = {}
@@ -28,6 +29,8 @@ function M.fn(fname)
2829

2930
local absolute_paths_searched = {}
3031

32+
watch.refresh_path(vim.fn.fnamemodify(fname, ":h"))
33+
3134
local found = Iterator.builder(core.get_explorer().nodes)
3235
:matcher(function(node)
3336
return node.absolute_path == fname_real or node.link_to == fname_real

0 commit comments

Comments
 (0)