diff src/evalfunc.c @ 10732:390ad2cccd3f v8.0.0256

patch 8.0.0256: missing changes to one file breaks test commit https://github.com/vim/vim/commit/3a29abcb6154d9f55ca8abd6d97e5822b97ac4b3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 28 18:31:41 2017 +0100 patch 8.0.0256: missing changes to one file breaks test Problem: Tests fail because some changes were not included. Solution: Add changes to evalfunc.c
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Jan 2017 18:45:04 +0100
parents 7598ce51bf2a
children a7789921b514
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -10136,20 +10136,15 @@ f_setpos(typval_T *argvars, typval_T *re
 		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)
 	    {