summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-28 17:07:52 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-28 17:07:52 +0200
commit2c8c681bfcd5138a0ec8ce018216dc2dc69a11a0 (patch)
tree8bacefb197e9c6267098c338013d445d0503b8ca
parent95e51470f10e1ddcc4b2ce53e4f7ff7aa2e58417 (diff)
downloadvim-git-2c8c681bfcd5138a0ec8ce018216dc2dc69a11a0.tar.gz
patch 8.1.0219: expanding ## fails to escape backtickv8.1.0219
Problem: Expanding ## fails to escape backtick. Solution: Escape a backtick in a file name. (closes #3257)
-rw-r--r--src/ex_docmd.c2
-rw-r--r--src/testdir/test_edit.vim8
-rw-r--r--src/version.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 4c653ff5e..54fb6aba1 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10954,7 +10954,7 @@ arg_all(void)
#ifndef BACKSLASH_IN_FILENAME
|| *p == '\\'
#endif
- )
+ || *p == '`')
{
/* insert a backslash */
if (retval != NULL)
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index ab2fe7c82..651f1f8fa 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1375,6 +1375,14 @@ func Test_edit_complete_very_long_name()
set swapfile&
endfunc
+func Test_edit_backtick()
+ next a\`b c
+ call assert_equal('a`b', expand('%'))
+ next
+ call assert_equal('c', expand('%'))
+ call assert_equal('a\`b c', expand('##'))
+endfunc
+
func Test_edit_quit()
edit foo.txt
split
diff --git a/src/version.c b/src/version.c
index cf7fa29ce..4ea5c75bf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -799,6 +799,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 219,
+/**/
218,
/**/
217,