mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
vim-patch:7.4.1093
Problem: Typo in test goes unnoticed.
Solution: Fix the typo. Give error for wrong arguments to cursor().
(partly by Hirohito Higashi) Add a test for cursor().
24c4d539ee
This commit is contained in:
@@ -8818,12 +8818,12 @@ static void f_cscope_connection(typval_T *argvars, typval_T *rettv)
|
|||||||
rettv->vval.v_number = cs_connection(num, dbpath, prepend);
|
rettv->vval.v_number = cs_connection(num, dbpath, prepend);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// "cursor(lnum, col)" function, or
|
||||||
* "cursor(lnum, col)" function
|
/// "cursor(list)"
|
||||||
*
|
///
|
||||||
* Moves the cursor to the specified line and column.
|
/// Moves the cursor to the specified line and column.
|
||||||
* Returns 0 when the position could be set, -1 otherwise.
|
///
|
||||||
*/
|
/// @returns 0 when the position could be set, -1 otherwise.
|
||||||
static void f_cursor(typval_T *argvars, typval_T *rettv)
|
static void f_cursor(typval_T *argvars, typval_T *rettv)
|
||||||
{
|
{
|
||||||
long line, col;
|
long line, col;
|
||||||
@@ -8835,8 +8835,10 @@ static void f_cursor(typval_T *argvars, typval_T *rettv)
|
|||||||
colnr_T curswant = -1;
|
colnr_T curswant = -1;
|
||||||
|
|
||||||
if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL) {
|
if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL) {
|
||||||
|
EMSG(_(e_invarg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
line = pos.lnum;
|
line = pos.lnum;
|
||||||
col = pos.col;
|
col = pos.col;
|
||||||
coladd = pos.coladd;
|
coladd = pos.coladd;
|
||||||
|
@@ -197,7 +197,7 @@ static int included_patches[] = {
|
|||||||
// 1096,
|
// 1096,
|
||||||
// 1095 NA
|
// 1095 NA
|
||||||
// 1094,
|
// 1094,
|
||||||
// 1093,
|
1093,
|
||||||
// 1092,
|
// 1092,
|
||||||
// 1091,
|
// 1091,
|
||||||
// 1090,
|
// 1090,
|
||||||
|
Reference in New Issue
Block a user