aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/funcs.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-12 18:10:13 +0800
committerGitHub <noreply@github.com>2022-09-12 18:10:13 +0800
commit2ea6584a1b798bc7bb77d97735c77c0c7ce38706 (patch)
treeca90a565370f46fd84ddf052c5769e04ede33e00 /src/nvim/eval/funcs.c
parent738c204523e4da07468268ae89741f2c86887031 (diff)
parent245ac6f263b6017c050f885212ee80e5738d3b9f (diff)
downloadrneovim-2ea6584a1b798bc7bb77d97735c77c0c7ce38706.tar.gz
rneovim-2ea6584a1b798bc7bb77d97735c77c0c7ce38706.tar.bz2
rneovim-2ea6584a1b798bc7bb77d97735c77c0c7ce38706.zip
Merge pull request #20163 from zeertzjq/vim-8.2.5034
vim-patch:8.2.5034: there is no way to get the byte index from a virtual column
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r--src/nvim/eval/funcs.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index bff4361dcb..4a139c85d1 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -7057,32 +7057,6 @@ static void f_screencol(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
rettv->vval.v_number = ui_current_col() + 1;
}
-/// "screenpos({winid}, {lnum}, {col})" function
-static void f_screenpos(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
-{
- tv_dict_alloc_ret(rettv);
- dict_T *dict = rettv->vval.v_dict;
-
- win_T *wp = find_win_by_nr_or_id(&argvars[0]);
- if (wp == NULL) {
- return;
- }
-
- pos_T pos = {
- .lnum = (linenr_T)tv_get_number(&argvars[1]),
- .col = (colnr_T)tv_get_number(&argvars[2]) - 1,
- .coladd = 0
- };
- int row = 0;
- int scol = 0, ccol = 0, ecol = 0;
- textpos2screenpos(wp, &pos, &row, &scol, &ccol, &ecol, false);
-
- tv_dict_add_nr(dict, S_LEN("row"), row);
- tv_dict_add_nr(dict, S_LEN("col"), scol);
- tv_dict_add_nr(dict, S_LEN("curscol"), ccol);
- tv_dict_add_nr(dict, S_LEN("endcol"), ecol);
-}
-
/// "screenrow()" function
static void f_screenrow(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
{