mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-31 07:09:54 +02:00
fix(autocmds): last_loc autocmd didn't work correctly for first opened file
This commit is contained in:
parent
7272b3e4b5
commit
0cc80b1b05
2 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,9 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
|
|||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
group = augroup("last_loc"),
|
||||
callback = function(event)
|
||||
if event.data and event.data.lazy_file then
|
||||
return
|
||||
end
|
||||
local exclude = { "gitcommit" }
|
||||
local buf = event.buf
|
||||
if vim.tbl_contains(exclude, vim.bo[buf].filetype) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue