Merge pull request #629 from w1ck3dg0ph3r/fix-nav-file-column

Fix nav_file column being off by 1
This commit is contained in:
ThePrimeagen 2024-08-29 11:20:22 -05:00 committed by GitHub
commit 1bc17e3e42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -195,7 +195,7 @@ function M.nav_file(id)
vim.api.nvim_set_current_buf(buf_id)
vim.api.nvim_buf_set_option(buf_id, "buflisted", true)
if set_row and mark.row and mark.col then
vim.cmd(string.format(":call cursor(%d, %d)", mark.row, mark.col))
vim.api.nvim_win_set_cursor(0, { mark.row, mark.col })
log.debug(
string.format(
"nav_file(): Setting cursor to row: %d, col: %d",