Skip to content

Commit 234a94f

Browse files
committed
fix: ignore tempfile error
close #3226
1 parent eb33612 commit 234a94f

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

lua/nvim-tree/view.lua

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,31 @@ local DEFAULT_LINES_EXCLUDED = {
1818
local DEFAULT_PADDING = 1
1919

2020
M.View = {
21-
adaptive_size = false,
21+
adaptive_size = false,
2222
centralize_selection = false,
23-
tabpages = {},
24-
cursors = {},
25-
hide_root_folder = false,
26-
live_filter = {
23+
tabpages = {},
24+
cursors = {},
25+
hide_root_folder = false,
26+
live_filter = {
2727
prev_focused_node = nil,
2828
},
29-
winopts = {
29+
winopts = {
3030
relativenumber = false,
31-
number = false,
32-
list = false,
33-
foldenable = false,
34-
winfixwidth = true,
35-
winfixheight = true,
36-
spell = false,
37-
signcolumn = "yes",
38-
foldmethod = "manual",
39-
foldcolumn = "0",
40-
cursorcolumn = false,
41-
cursorline = true,
42-
cursorlineopt = "both",
43-
colorcolumn = "0",
44-
wrap = false,
45-
winhl = table.concat({
31+
number = false,
32+
list = false,
33+
foldenable = false,
34+
winfixwidth = true,
35+
winfixheight = true,
36+
spell = false,
37+
signcolumn = "yes",
38+
foldmethod = "manual",
39+
foldcolumn = "0",
40+
cursorcolumn = false,
41+
cursorline = true,
42+
cursorlineopt = "both",
43+
colorcolumn = "0",
44+
wrap = false,
45+
winhl = table.concat({
4646
"EndOfBuffer:NvimTreeEndOfBuffer",
4747
"CursorLine:NvimTreeCursorLine",
4848
"CursorLineNr:NvimTreeCursorLineNr",
@@ -71,12 +71,12 @@ local BUFNR_PER_TAB = {}
7171

7272
---@type { name: string, value: any }[]
7373
local BUFFER_OPTIONS = {
74-
{ name = "bufhidden", value = "wipe" },
75-
{ name = "buflisted", value = false },
76-
{ name = "buftype", value = "nofile" },
77-
{ name = "filetype", value = "NvimTree" },
74+
{ name = "bufhidden", value = "wipe" },
75+
{ name = "buflisted", value = false },
76+
{ name = "buftype", value = "nofile" },
77+
{ name = "filetype", value = "NvimTree" },
7878
{ name = "modifiable", value = false },
79-
{ name = "swapfile", value = false },
79+
{ name = "swapfile", value = false },
8080
}
8181

8282
---@param bufnr integer
@@ -104,12 +104,12 @@ local function create_buffer(bufnr)
104104

105105
local tab = vim.api.nvim_get_current_tabpage()
106106
BUFNR_PER_TAB[tab] = bufnr or vim.api.nvim_create_buf(false, false)
107-
vim.api.nvim_buf_set_name(M.get_bufnr(), "NvimTree_" .. tab)
108107

109108
bufnr = M.get_bufnr()
110109
for _, option in ipairs(BUFFER_OPTIONS) do
111110
vim.api.nvim_set_option_value(option.name, option.value, { buf = bufnr })
112111
end
112+
vim.api.nvim_buf_set_name(M.get_bufnr(), "NvimTree_" .. tab)
113113

114114
require("nvim-tree.keymap").on_attach(M.get_bufnr())
115115

0 commit comments

Comments
 (0)