summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-14 19:37:08 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-14 19:37:08 +0100
commit06b056e110005ce0dd97b8c6333405afd06c36fc (patch)
treeb2d0a1a78c762c56df673a712e9bb30cd593d441 /src/ex_cmds.c
parent06d4c4c818fe4258bdc3d455b7680fabadd719e4 (diff)
patch 8.1.0588: cannot define a sign with space in the textv8.1.0588
Problem: Cannot define a sign with space in the text. Solution: Allow for escaping characters. (Ben Jackson, closes #2967)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index cb728d4052..cd243a5ef4 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -7779,6 +7779,14 @@ ex_sign(exarg_T *eap)
int len;
arg += 5;
+ for (s = arg; s + 1 < p; ++s)
+ if (*s == '\\')
+ {
+ // Remove a backslash, so that it is possible
+ // to use a space.
+ STRMOVE(s, s + 1);
+ --p;
+ }
# ifdef FEAT_MBYTE
/* Count cells and check for non-printable chars */
if (has_mbyte)