mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.0063: too many type casts for dict_get functions
Problem: Too many type casts for dict_get functions. Solution: Change the key argument from "char_u *" to "char *".
This commit is contained in:
@@ -1016,11 +1016,11 @@ f_win_splitmove(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
|
||||
d = argvars[2].vval.v_dict;
|
||||
if (dict_get_bool(d, (char_u *)"vertical", FALSE))
|
||||
if (dict_get_bool(d, "vertical", FALSE))
|
||||
flags |= WSP_VERT;
|
||||
if ((di = dict_find(d, (char_u *)"rightbelow", -1)) != NULL)
|
||||
flags |= tv_get_bool(&di->di_tv) ? WSP_BELOW : WSP_ABOVE;
|
||||
size = (int)dict_get_number(d, (char_u *)"size");
|
||||
size = (int)dict_get_number(d, "size");
|
||||
}
|
||||
|
||||
win_move_into_split(wp, targetwin, size, flags);
|
||||
@@ -1236,27 +1236,27 @@ f_winrestview(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
else
|
||||
{
|
||||
if (dict_has_key(dict, "lnum"))
|
||||
curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, (char_u *)"lnum");
|
||||
curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, "lnum");
|
||||
if (dict_has_key(dict, "col"))
|
||||
curwin->w_cursor.col = (colnr_T)dict_get_number(dict, (char_u *)"col");
|
||||
curwin->w_cursor.col = (colnr_T)dict_get_number(dict, "col");
|
||||
if (dict_has_key(dict, "coladd"))
|
||||
curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, (char_u *)"coladd");
|
||||
curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, "coladd");
|
||||
if (dict_has_key(dict, "curswant"))
|
||||
{
|
||||
curwin->w_curswant = (colnr_T)dict_get_number(dict, (char_u *)"curswant");
|
||||
curwin->w_curswant = (colnr_T)dict_get_number(dict, "curswant");
|
||||
curwin->w_set_curswant = FALSE;
|
||||
}
|
||||
|
||||
if (dict_has_key(dict, "topline"))
|
||||
set_topline(curwin, (linenr_T)dict_get_number(dict, (char_u *)"topline"));
|
||||
set_topline(curwin, (linenr_T)dict_get_number(dict, "topline"));
|
||||
#ifdef FEAT_DIFF
|
||||
if (dict_has_key(dict, "topfill"))
|
||||
curwin->w_topfill = (int)dict_get_number(dict, (char_u *)"topfill");
|
||||
curwin->w_topfill = (int)dict_get_number(dict, "topfill");
|
||||
#endif
|
||||
if (dict_has_key(dict, "leftcol"))
|
||||
curwin->w_leftcol = (colnr_T)dict_get_number(dict, (char_u *)"leftcol");
|
||||
curwin->w_leftcol = (colnr_T)dict_get_number(dict, "leftcol");
|
||||
if (dict_has_key(dict, "skipcol"))
|
||||
curwin->w_skipcol = (colnr_T)dict_get_number(dict, (char_u *)"skipcol");
|
||||
curwin->w_skipcol = (colnr_T)dict_get_number(dict, "skipcol");
|
||||
|
||||
check_cursor();
|
||||
win_new_height(curwin, curwin->w_height);
|
||||
|
Reference in New Issue
Block a user