aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-06 17:58:02 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-06-07 12:02:57 -0400
commite0d39d8e5330407be19575a6f57dde436a036df0 (patch)
tree4a3f7c47c9852326f37e7c1529affb326bf74476 /src/nvim/eval.c
parent2d456f84d1f87ae9c8ca34db6c68b7d49b786193 (diff)
downloadrneovim-e0d39d8e5330407be19575a6f57dde436a036df0.tar.gz
rneovim-e0d39d8e5330407be19575a6f57dde436a036df0.tar.bz2
rneovim-e0d39d8e5330407be19575a6f57dde436a036df0.zip
vim-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 https://github.com/vim/vim/commit/3a29abcb6154d9f55ca8abd6d97e5822b97ac4b3
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index ffea88aa83..d1f8ce75fa 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -14806,18 +14806,14 @@ static void f_setpos(typval_T *argvars, typval_T *rettv, FunPtr fptr)
pos.col = 0;
}
if (name[0] == '.' && name[1] == NUL) {
- // set cursor
- if (fnum == curbuf->b_fnum) {
- curwin->w_cursor = pos;
- if (curswant >= 0) {
- curwin->w_curswant = curswant - 1;
- curwin->w_set_curswant = false;
- }
- check_cursor();
- rettv->vval.v_number = 0;
- } else {
- EMSG(_(e_invarg));
+ // set cursor; "fnum" is ignored
+ curwin->w_cursor = pos;
+ if (curswant >= 0) {
+ curwin->w_curswant = curswant - 1;
+ curwin->w_set_curswant = false;
}
+ check_cursor();
+ rettv->vval.v_number = 0;
} else if (name[0] == '\'' && name[1] != NUL && name[2] == NUL) {
// set mark
if (setmark_pos((uint8_t)name[1], &pos, fnum) == OK) {