mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.3.748
Problem: Cannot properly test conceal mode. Solution: Add the screencol() and screenrow() functions. Use them in test88. (Simon Ruderich)
This commit is contained in:
28
src/eval.c
28
src/eval.c
@@ -668,6 +668,8 @@ static void f_reverse __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
#ifdef FEAT_FLOAT
|
||||
static void f_round __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
#endif
|
||||
static void f_screencol __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_screenrow __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_search __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_searchdecl __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
static void f_searchpair __ARGS((typval_T *argvars, typval_T *rettv));
|
||||
@@ -8033,6 +8035,8 @@ static struct fst
|
||||
#ifdef FEAT_FLOAT
|
||||
{"round", 1, 1, f_round},
|
||||
#endif
|
||||
{"screencol", 0, 0, f_screencol},
|
||||
{"screenrow", 0, 0, f_screenrow},
|
||||
{"search", 1, 4, f_search},
|
||||
{"searchdecl", 1, 3, f_searchdecl},
|
||||
{"searchpair", 3, 7, f_searchpair},
|
||||
@@ -15724,6 +15728,30 @@ f_round(argvars, rettv)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "screencol()" function
|
||||
*
|
||||
* First column is 1 to be consistent with virtcol().
|
||||
*/
|
||||
static void
|
||||
f_screencol(argvars, rettv)
|
||||
typval_T *argvars UNUSED;
|
||||
typval_T *rettv;
|
||||
{
|
||||
rettv->vval.v_number = screen_screencol() + 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* "screenrow()" function
|
||||
*/
|
||||
static void
|
||||
f_screenrow(argvars, rettv)
|
||||
typval_T *argvars UNUSED;
|
||||
typval_T *rettv;
|
||||
{
|
||||
rettv->vval.v_number = screen_screenrow() + 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* "search()" function
|
||||
*/
|
||||
|
Reference in New Issue
Block a user