mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-29 07:05:30 +02:00
fix(autocmds): retore last location for correct buffer
This commit is contained in:
parent
936d74bb61
commit
afc8e7f8ca
1 changed files with 2 additions and 2 deletions
|
@ -31,9 +31,9 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
|
|||
-- go to last loc when opening a buffer
|
||||
vim.api.nvim_create_autocmd("BufReadPost", {
|
||||
group = augroup("last_loc"),
|
||||
callback = function()
|
||||
callback = function(event)
|
||||
local exclude = { "gitcommit" }
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local buf = event.buf
|
||||
if vim.tbl_contains(exclude, vim.bo[buf].filetype) then
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue