mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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
3a29abcb61
This commit is contained in:
parent
2d456f84d1
commit
e0d39d8e53
@ -14806,18 +14806,14 @@ static void f_setpos(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
pos.col = 0;
|
pos.col = 0;
|
||||||
}
|
}
|
||||||
if (name[0] == '.' && name[1] == NUL) {
|
if (name[0] == '.' && name[1] == NUL) {
|
||||||
// set cursor
|
// set cursor; "fnum" is ignored
|
||||||
if (fnum == curbuf->b_fnum) {
|
curwin->w_cursor = pos;
|
||||||
curwin->w_cursor = pos;
|
if (curswant >= 0) {
|
||||||
if (curswant >= 0) {
|
curwin->w_curswant = curswant - 1;
|
||||||
curwin->w_curswant = curswant - 1;
|
curwin->w_set_curswant = false;
|
||||||
curwin->w_set_curswant = false;
|
|
||||||
}
|
|
||||||
check_cursor();
|
|
||||||
rettv->vval.v_number = 0;
|
|
||||||
} else {
|
|
||||||
EMSG(_(e_invarg));
|
|
||||||
}
|
}
|
||||||
|
check_cursor();
|
||||||
|
rettv->vval.v_number = 0;
|
||||||
} else if (name[0] == '\'' && name[1] != NUL && name[2] == NUL) {
|
} else if (name[0] == '\'' && name[1] != NUL && name[2] == NUL) {
|
||||||
// set mark
|
// set mark
|
||||||
if (setmark_pos((uint8_t)name[1], &pos, fnum) == OK) {
|
if (setmark_pos((uint8_t)name[1], &pos, fnum) == OK) {
|
||||||
|
@ -27,9 +27,8 @@ describe('setpos() function', function()
|
|||||||
eq(getpos("."), {0, 2, 1, 0})
|
eq(getpos("."), {0, 2, 1, 0})
|
||||||
setpos(".", {2, 1, 1, 0})
|
setpos(".", {2, 1, 1, 0})
|
||||||
eq(getpos("."), {0, 1, 1, 0})
|
eq(getpos("."), {0, 1, 1, 0})
|
||||||
-- Ensure get an error attempting to set position to another buffer
|
|
||||||
local ret = exc_exec('call setpos(".", [1, 1, 1, 0])')
|
local ret = exc_exec('call setpos(".", [1, 1, 1, 0])')
|
||||||
eq('Vim(call):E474: Invalid argument', ret)
|
eq(0, ret)
|
||||||
end)
|
end)
|
||||||
it('can set lowercase marks in the current buffer', function()
|
it('can set lowercase marks in the current buffer', function()
|
||||||
setpos("'d", {0, 2, 1, 0})
|
setpos("'d", {0, 2, 1, 0})
|
||||||
|
Loading…
Reference in New Issue
Block a user