aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-03-02 16:34:25 +0900
committerwatiko <service@mail.watiko.net>2016-03-02 16:41:53 +0900
commit9e3ebb67119438d46eaceac739aca88880177060 (patch)
tree68868be16992d3a3f7ebb76544d277fab0869469 /src
parentd5904160d781465e5d52029396e9754b5846bbee (diff)
downloadrneovim-9e3ebb67119438d46eaceac739aca88880177060.tar.gz
rneovim-9e3ebb67119438d46eaceac739aca88880177060.tar.bz2
rneovim-9e3ebb67119438d46eaceac739aca88880177060.zip
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(). https://github.com/vim/vim/commit/24c4d539eed33e8073f8f9fe2bee497bbba935a4
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c14
-rw-r--r--src/nvim/version.c2
2 files changed, 9 insertions, 7 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index b8fda27f17..359120a6a1 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -8818,12 +8818,12 @@ static void f_cscope_connection(typval_T *argvars, typval_T *rettv)
rettv->vval.v_number = cs_connection(num, dbpath, prepend);
}
-/*
- * "cursor(lnum, col)" function
- *
- * Moves the cursor to the specified line and column.
- * Returns 0 when the position could be set, -1 otherwise.
- */
+/// "cursor(lnum, col)" function, or
+/// "cursor(list)"
+///
+/// Moves the cursor to the specified line and column.
+///
+/// @returns 0 when the position could be set, -1 otherwise.
static void f_cursor(typval_T *argvars, typval_T *rettv)
{
long line, col;
@@ -8835,8 +8835,10 @@ static void f_cursor(typval_T *argvars, typval_T *rettv)
colnr_T curswant = -1;
if (list2fpos(argvars, &pos, NULL, &curswant) == FAIL) {
+ EMSG(_(e_invarg));
return;
}
+
line = pos.lnum;
col = pos.col;
coladd = pos.coladd;
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 45bfad702c..7c460cd127 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -197,7 +197,7 @@ static int included_patches[] = {
// 1096,
// 1095 NA
// 1094,
- // 1093,
+ 1093,
// 1092,
// 1091,
// 1090,