Skip to content

Commit 4db5dfa

Browse files
committed
fix: set nowrap in buffer instead of on each draw
1 parent 84126d3 commit 4db5dfa

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lua/nvim-tree/renderer.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,6 @@ function M.draw(tree, reload)
455455
if cursor and #lines >= cursor[1] then
456456
api.nvim_win_set_cursor(view.get_winnr(), cursor)
457457
end
458-
if cursor then
459-
api.nvim_win_set_option(view.get_winnr(), 'wrap', false)
460-
end
461458
end
462459

463460
function M.render_hl(bufnr)

lua/nvim-tree/view.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ M.View = {
2424
foldcolumn = '0',
2525
cursorcolumn = false,
2626
colorcolumn = '0',
27+
wrap = false,
2728
winhl = table.concat({
2829
'EndOfBuffer:NvimTreeEndOfBuffer',
2930
'Normal:NvimTreeNormal',

0 commit comments

Comments
 (0)