mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-02 00:54:50 +02:00
fix(autocmds): jump to last loc in buffer (#1061)
vim.api.nvim_win_set_cursor is expecting a window handle but was being passed the current buffer's handle instead
This commit is contained in:
parent
b660b51718
commit
baa9614022
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ vim.api.nvim_create_autocmd("BufReadPost", {
|
|||
local mark = vim.api.nvim_buf_get_mark(buf, '"')
|
||||
local lcount = vim.api.nvim_buf_line_count(buf)
|
||||
if mark[1] > 0 and mark[1] <= lcount then
|
||||
pcall(vim.api.nvim_win_set_cursor, buf, mark)
|
||||
pcall(vim.api.nvim_win_set_cursor, 0, mark)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue