diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-02-06 04:46:16 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-02-06 04:46:16 +0800 |
commit | 6ab71683d14a408e79f7cbda3a07ab65f76c6b35 (patch) | |
tree | 1b157a39bd397cca8e0887aeb07a806db52040f3 /src/nvim/eval/typval.c | |
parent | 8ba9f19961d8573dc851d3d5f2ec217ad2fb7b28 (diff) | |
download | rneovim-6ab71683d14a408e79f7cbda3a07ab65f76c6b35.tar.gz rneovim-6ab71683d14a408e79f7cbda3a07ab65f76c6b35.tar.bz2 rneovim-6ab71683d14a408e79f7cbda3a07ab65f76c6b35.zip |
vim-patch:8.2.2324: not easy to get mark en cursor posotion by character count
Problem: Not easy to get mark en cursor posotion by character count.
Solution: Add functions that use character index. (Yegappan Lakshmanan,
closes vim/vim#7648)
https://github.com/vim/vim/commit/6f02b00bb0958f70bc15534e115b4c6dadff0e06
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 42ac1839e6..e583ce49b2 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -3091,7 +3091,7 @@ linenr_T tv_get_lnum(const typval_T *const tv) linenr_T lnum = (linenr_T)tv_get_number_chk(tv, NULL); if (lnum == 0) { // No valid number, try using same function as line() does. int fnum; - pos_T *const fp = var2fpos(tv, true, &fnum); + pos_T *const fp = var2fpos(tv, true, &fnum, false); if (fp != NULL) { lnum = fp->lnum; } |