diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-11-21 10:29:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-11-21 10:29:45 +0000 |
commit | 93db975fa459f7c5b535694e713b40d5c0b56fd9 (patch) | |
tree | 236d145162f092e6b2c0035e86b9cbc724200aca /src/ex_getln.c | |
parent | 9a51c6e35df63eae7205df9b7c22cfc59e810110 (diff) | |
download | vim-git-93db975fa459f7c5b535694e713b40d5c0b56fd9.tar.gz |
updated for version 7.0-165v7.0.165
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 030be38ea..a7de0503e 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -34,7 +34,7 @@ struct cmdline_info int xp_context; /* type of expansion */ # ifdef FEAT_EVAL char_u *xp_arg; /* user-defined expansion arg */ - int input_fn; /* Invoked for input() function */ + int input_fn; /* when TRUE Invoked for input() function */ # endif }; @@ -1390,7 +1390,17 @@ getcmdline(firstc, count, indent) { c = gchar_cursor(); if (c != NUL) + { + if (c == firstc || vim_strchr((char_u *)( + p_magic ? "\\^$.*[" : "\\^$"), c) + != NULL) + { + /* put a backslash before special characters */ + stuffcharReadbuff(c); + c = '\\'; + } break; + } } goto cmdline_not_changed; } |