chore: move help rendering in its own file

This commit is contained in:
kiyan
2021-10-10 11:48:02 +02:00
parent 94b8604e86
commit 86e6dc627e
3 changed files with 55 additions and 50 deletions

View File

@@ -107,7 +107,7 @@ function M.get_node_at_cursor()
local cursor = api.nvim_win_get_cursor(view.get_winnr())
local line = cursor[1]
if view.is_help_ui() then
local help_lines, _ = renderer.draw_help()
local help_lines = require'nvim-tree.renderer.help'.compute_lines()
local help_text = get_node_at_line(line+1)(help_lines)
return {name = help_text}
else