aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-06 04:46:16 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-06 04:46:16 +0800
commit6ab71683d14a408e79f7cbda3a07ab65f76c6b35 (patch)
tree1b157a39bd397cca8e0887aeb07a806db52040f3 /src/nvim/eval/typval.c
parent8ba9f19961d8573dc851d3d5f2ec217ad2fb7b28 (diff)
downloadrneovim-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.c2
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;
}