summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-23 20:58:45 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-23 20:58:45 +0200
commit37f4cbd46f5a6f2dd3a48d5fa4324dce37e4bd6c (patch)
treebed00affbe1920deeeb36b270db9c3b076694c0f /src/eval.c
parent570497ac409ad448574bb6210cb9c6e573483759 (diff)
patch 8.1.1913: not easy to compute the space on the command linev8.1.1913
Problem: Not easy to compute the space on the command line. Solution: Add v:echospace. (Daniel Hahler, closes #4732)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 5c5fd2f10d..9a2642cbe8 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -201,6 +201,7 @@ static struct vimvar
{VV_NAME("termblinkresp", VAR_STRING), VV_RO},
{VV_NAME("event", VAR_DICT), VV_RO},
{VV_NAME("versionlong", VAR_NUMBER), VV_RO},
+ {VV_NAME("echospace", VAR_NUMBER), VV_RO},
};
/* shorthand */
@@ -389,6 +390,8 @@ eval_init(void)
set_vim_var_nr(VV_TYPE_CHANNEL, VAR_TYPE_CHANNEL);
set_vim_var_nr(VV_TYPE_BLOB, VAR_TYPE_BLOB);
+ set_vim_var_nr(VV_ECHOSPACE, sc_col - 1);
+
set_reg_var(0); /* default for v:register is not 0 but '"' */
#ifdef EBCDIC