diff src/eval.c @ 17833:8377ec7c5824 v8.1.1913

patch 8.1.1913: not easy to compute the space on the command line Commit: https://github.com/vim/vim/commit/37f4cbd46f5a6f2dd3a48d5fa4324dce37e4bd6c Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 23 20:58:45 2019 +0200 patch 8.1.1913: not easy to compute the space on the command line Problem: Not easy to compute the space on the command line. Solution: Add v:echospace. (Daniel Hahler, closes https://github.com/vim/vim/issues/4732)
author Bram Moolenaar <Bram@vim.org>
date Fri, 23 Aug 2019 21:00:05 +0200
parents 9c15c85db5d8
children d50a5faa75bd
line wrap: on
line diff
--- 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