Skip to content
Permalink
Browse files
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)
  • Loading branch information
brammool committed Jul 28, 2018
1 parent 95e5147 commit 2c8c681bfcd5138a0ec8ce018216dc2dc69a11a0
Showing with 11 additions and 1 deletion.
  1. +1 −1 src/ex_docmd.c
  2. +8 −0 src/testdir/test_edit.vim
  3. +2 −0 src/version.c
@@ -10954,7 +10954,7 @@ arg_all(void)
#ifndef BACKSLASH_IN_FILENAME
|| *p == '\\'
#endif
)
|| *p == '`')
{
/* insert a backslash */
if (retval != NULL)
@@ -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
@@ -798,6 +798,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
219,
/**/
218,
/**/

0 comments on commit 2c8c681

Please sign in to comment.