summaryrefslogtreecommitdiff
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-28 18:31:41 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-28 18:31:41 +0100
commit3a29abcb6154d9f55ca8abd6d97e5822b97ac4b3 (patch)
treebbb889a08b3738f88fafdf5b8567a59d33b6b67f /src/evalfunc.c
parentf13e00b2cf381e13fd327b5387a5bd6f004ac2a3 (diff)
downloadvim-git-3a29abcb6154d9f55ca8abd6d97e5822b97ac4b3.tar.gz
patch 8.0.0256: missing changes to one file breaks testv8.0.0256
Problem: Tests fail because some changes were not included. Solution: Add changes to evalfunc.c
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index a3441a0cc..6706fe17b 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -10136,20 +10136,15 @@ f_setpos(typval_T *argvars, typval_T *rettv)
pos.col = 0;
if (name[0] == '.' && name[1] == NUL)
{
- /* set cursor */
- if (fnum == curbuf->b_fnum)
+ /* set cursor; "fnum" is ignored */
+ curwin->w_cursor = pos;
+ if (curswant >= 0)
{
- curwin->w_cursor = pos;
- if (curswant >= 0)
- {
- curwin->w_curswant = curswant - 1;
- curwin->w_set_curswant = FALSE;
- }
- check_cursor();
- rettv->vval.v_number = 0;
+ curwin->w_curswant = curswant - 1;
+ curwin->w_set_curswant = FALSE;
}
- else
- EMSG(_(e_invarg));
+ check_cursor();
+ rettv->vval.v_number = 0;
}
else if (name[0] == '\'' && name[1] != NUL && name[2] == NUL)
{