mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
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)
6f02b00bb0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user