diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-21 17:42:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 17:42:17 +0800 |
commit | c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc (patch) | |
tree | 63151061bb72c56bed896bb93224687524fec314 /src/nvim/regexp_nfa.c | |
parent | 6a7d00469bd64e8fe63468b5c1643087432709e9 (diff) | |
download | rneovim-c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc.tar.gz rneovim-c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc.tar.bz2 rneovim-c15e9d3746ee0aa6a9d80596bffc19e9ac9612bc.zip |
fix(mark): give correct error message when mark is in another buffer (#19454)
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r-- | src/nvim/regexp_nfa.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index 870af3eafc..eda18ebec9 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -6930,10 +6930,8 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm case NFA_MARK: case NFA_MARK_GT: case NFA_MARK_LT: { - fmark_T *fm; size_t col = REG_MULTI ? rex.input - rex.line : 0; - // fm will be NULL if the mark is not set, doesn't belong to reg_buf - fm = mark_get(rex.reg_buf, curwin, NULL, kMarkBufLocal, t->state->val); + fmark_T *fm = mark_get(rex.reg_buf, curwin, NULL, kMarkBufLocal, t->state->val); // Line may have been freed, get it again. if (REG_MULTI) { |