diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 14:13:53 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-12-23 14:13:53 -0500 |
commit | 79fd93768ace47cdacd3f4b7afb3feaa57353c04 (patch) | |
tree | 9fbdc7cd4350026a19f98696040760b2bd17fb60 | |
parent | 68f6fcffbff3279db3bbf1041de5ae246a6dd07d (diff) | |
parent | c824e7b2d2c9ef7fc97049c094e00f26adb43550 (diff) | |
download | rneovim-79fd93768ace47cdacd3f4b7afb3feaa57353c04.tar.gz rneovim-79fd93768ace47cdacd3f4b7afb3feaa57353c04.tar.bz2 rneovim-79fd93768ace47cdacd3f4b7afb3feaa57353c04.zip |
Merge pull request #1720 from fwalch/vim-7.4.311
vim-patch:7.4.311
-rw-r--r-- | src/nvim/eval.c | 35 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 26 insertions, 11 deletions
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 cd11dfe1d0..ae9151c972 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, |