fix: set nowrap in buffer instead of on each draw
This commit is contained in:
@@ -455,9 +455,6 @@ function M.draw(tree, reload)
|
||||
if cursor and #lines >= cursor[1] then
|
||||
api.nvim_win_set_cursor(view.get_winnr(), cursor)
|
||||
end
|
||||
if cursor then
|
||||
api.nvim_win_set_option(view.get_winnr(), 'wrap', false)
|
||||
end
|
||||
end
|
||||
|
||||
function M.render_hl(bufnr)
|
||||
|
||||
@@ -24,6 +24,7 @@ M.View = {
|
||||
foldcolumn = '0',
|
||||
cursorcolumn = false,
|
||||
colorcolumn = '0',
|
||||
wrap = false,
|
||||
winhl = table.concat({
|
||||
'EndOfBuffer:NvimTreeEndOfBuffer',
|
||||
'Normal:NvimTreeNormal',
|
||||
|
||||
Reference in New Issue
Block a user