aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mark.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-10-24 16:10:36 +0800
committerGitHub <noreply@github.com>2023-10-24 16:10:36 +0800
commitd432bba4e46cf215a1879cdbe7673160e612425a (patch)
tree7ecf3bfe446563a84aca84c2faee9e3c19fb9183 /src/nvim/mark.c
parent25cfe3fd432d77689446fe5a0bb972479298387c (diff)
downloadrneovim-d432bba4e46cf215a1879cdbe7673160e612425a.tar.gz
rneovim-d432bba4e46cf215a1879cdbe7673160e612425a.tar.bz2
rneovim-d432bba4e46cf215a1879cdbe7673160e612425a.zip
fix(marks): handle switching buffer properly (#25763)
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r--src/nvim/mark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c
index bf81cdb5ee..19fad179c6 100644
--- a/src/nvim/mark.c
+++ b/src/nvim/mark.c
@@ -520,7 +520,7 @@ static MarkMoveRes switch_to_mark_buf(fmark_T *fm, bool pcmark_on_switch)
if (fm->fnum != curbuf->b_fnum) {
// Switch to another file.
int getfile_flag = pcmark_on_switch ? GETF_SETMARK : 0;
- bool res = buflist_getfile(fm->fnum, (linenr_T)1, getfile_flag, false) == OK;
+ bool res = buflist_getfile(fm->fnum, fm->mark.lnum, getfile_flag, false) == OK;
return res == true ? kMarkSwitchedBuf : kMarkMoveFailed;
}
return 0;