fix(marks): handle switching buffer properly (#25763)

This commit is contained in:
zeertzjq
2023-10-24 16:10:36 +08:00
committed by GitHub
parent 25cfe3fd43
commit d432bba4e4
4 changed files with 58 additions and 2 deletions

View File

@@ -3379,6 +3379,7 @@ static linenr_T get_address(exarg_T *eap, char **ptr, cmd_addr_T addr_type, int
fmark_T *fm = mark_get(curbuf, curwin, NULL, flag, *cmd);
cmd++;
if (fm != NULL && fm->fnum != curbuf->handle) {
(void)mark_move_to(fm, 0);
// Jumped to another file.
lnum = curwin->w_cursor.lnum;
} else {