fix rendering before setting cursor pos in refresh
This commit is contained in:
parent
058cd31e2a
commit
d6f9b6a21c
@ -164,12 +164,11 @@ function M.set_index_and_redraw(fname)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local index = iter(M.Tree.entries)
|
local index = iter(M.Tree.entries)
|
||||||
|
renderer.draw(M.Tree, reload)
|
||||||
if index then
|
if index then
|
||||||
api.nvim_win_set_cursor(M.Tree.winnr, {index, 0})
|
api.nvim_win_set_cursor(M.Tree.winnr, {index, 0})
|
||||||
end
|
end
|
||||||
|
|
||||||
renderer.draw(M.Tree, reload)
|
|
||||||
|
|
||||||
return index
|
return index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user