Skip to content

Commit feb3437

Browse files
committed
attempt to fix E13 again
1 parent 23fd94d commit feb3437

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lua/notes.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ function M.open_notes()
2121

2222
if not buf then
2323
buf = vim.api.nvim_create_buf(true, true)
24-
vim.api.nvim_buf_set_name(buf, notes_file)
25-
26-
local contents = vim.fn.readfile(notes_file)
27-
vim.api.nvim_buf_set_lines(buf, 0, -1, false, contents)
24+
vim.api.nvim_buf_call(buf, function()
25+
vim.cmd('silent! edit ' .. vim.fn.fnameescape(notes_file))
26+
end)
2827
end
2928

3029
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")

0 commit comments

Comments
 (0)