mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
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)
This commit is contained in:
@@ -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,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user