Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lua/resession/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ M.load = function(name, opts)
_is_loading = false
dispatch("post_load", name, opts)

vim.api.nvim_exec_autocmds("BufReadPre", {})
vim.api.nvim_exec_autocmds("BufRead", {})

-- In case the current buffer has a swapfile, make sure we trigger all the necessary autocmds
vim.b._resession_need_edit = nil
vim.cmd.edit({ mods = { emsg_silent = true } })
Expand Down
4 changes: 0 additions & 4 deletions lua/resession/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ local function set_winlayout_data(layout, scale_factor, visit_data)
else
local bufnr = vim.fn.bufadd(win.bufname)
vim.api.nvim_win_set_buf(win.winid, bufnr)
-- After setting the buffer into the window, manually set the filetype to trigger syntax highlighting
vim.o.eventignore = ""
vim.bo[bufnr].filetype = vim.bo[bufnr].filetype
vim.o.eventignore = "all"
vim.b[bufnr].resession_restore_last_pos = nil
end
util.restore_win_options(win.winid, win.options)
Expand Down