diff options
-rwxr-xr-x | scripts/vim-patch.sh | 2 | ||||
-rw-r--r-- | src/nvim/eval.c | 35 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
3 files changed, 27 insertions, 12 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 7c07524090..6e098dd5eb 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -29,7 +29,7 @@ if [[ ! -d ${VIM_SOURCE_DIR} ]]; then else echo "Updating Vim sources in '${VIM_SOURCE_DIR}'." cd ${VIM_SOURCE_DIR} - hg pull --update + hg pull --update || echo 'Could not update Vim sources.' fi vim_tag="v${vim_version//./-}" diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d058e6ccae..f50a215559 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -15247,16 +15247,31 @@ static void f_winrestview(typval_T *argvars, typval_T *rettv) || (dict = argvars[0].vval.v_dict) == NULL) EMSG(_(e_invarg)); else { - curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum"); - curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col"); - curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd"); - curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); - curwin->w_set_curswant = FALSE; - - set_topline(curwin, get_dict_number(dict, (char_u *)"topline")); - curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); - curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol"); - curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol"); + if (dict_find(dict, (char_u *)"lnum", -1) != NULL) { + curwin->w_cursor.lnum = get_dict_number(dict, (char_u *)"lnum"); + } + if (dict_find(dict, (char_u *)"col", -1) != NULL) { + curwin->w_cursor.col = get_dict_number(dict, (char_u *)"col"); + } + if (dict_find(dict, (char_u *)"coladd", -1) != NULL) { + curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd"); + } + if (dict_find(dict, (char_u *)"curswant", -1) != NULL) { + curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); + curwin->w_set_curswant = FALSE; + } + if (dict_find(dict, (char_u *)"topline", -1) != NULL) { + set_topline(curwin, get_dict_number(dict, (char_u *)"topline")); + } + if (dict_find(dict, (char_u *)"topfill", -1) != NULL) { + curwin->w_topfill = get_dict_number(dict, (char_u *)"topfill"); + } + if (dict_find(dict, (char_u *)"leftcol", -1) != NULL) { + curwin->w_leftcol = get_dict_number(dict, (char_u *)"leftcol"); + } + if (dict_find(dict, (char_u *)"skipcol", -1) != NULL) { + curwin->w_skipcol = get_dict_number(dict, (char_u *)"skipcol"); + } check_cursor(); win_new_height(curwin, curwin->w_height); diff --git a/src/nvim/version.c b/src/nvim/version.c index e93683ab45..2ad066c7a3 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -426,7 +426,7 @@ static int included_patches[] = { 314, 313, 312, - //311, + 311, 310, 309, 308, |