patch 8.1.0219: expanding ## fails to escape backtick
Problem: Expanding ## fails to escape backtick.
Solution: Escape a backtick in a file name. (closes #3257)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 4c653ff..54fb6ab 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10954,7 +10954,7 @@
#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 ab2fe7c..651f1f8 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -1375,6 +1375,14 @@
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 cf7fa29..4ea5c75 100644
--- a/src/version.c
+++ b/src/version.c
@@ -799,6 +799,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 219,
+/**/
218,
/**/
217,