diff options
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 45355bd7ac..ae8e0d329f 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -351,7 +351,6 @@ typedef enum { * The reason to use this table anyway is for very quick access to the * variables with the VV_ defines. */ -#include "nvim/version_defs.h" /* values for vv_flags: */ #define VV_COMPAT 1 /* compatible, also used without "v:" */ @@ -9479,7 +9478,9 @@ static void getpos_both(typval_T *argvars, typval_T *rettv, bool getcurpos) list_append_number(l, (fp != NULL) ? (varnumber_T)fp->coladd : (varnumber_T)0); if (getcurpos) { - list_append_number(l, (varnumber_T) curwin->w_curswant + 1); + list_append_number(l, curwin->w_curswant == MAXCOL + ? (varnumber_T)MAXCOL + : (varnumber_T)curwin->w_curswant + 1); } } @@ -10656,7 +10657,7 @@ static void f_jobsend(typval_T *argvars, typval_T *rettv) } ssize_t input_len; - char *input = (char *) save_tv_as_string(&argvars[1], &input_len, true); + char *input = (char *) save_tv_as_string(&argvars[1], &input_len, false); if (!input) { // Either the error has been handled by save_tv_as_string(), or there is no // input to send. |