mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0219: expanding ## fails to escape backtick
Problem: Expanding ## fails to escape backtick.
Solution: Escape a backtick in a file name. (closes vim/vim#3257)
2c8c681bfc
This commit is contained in:
parent
a021b30ede
commit
8a845ab3ef
@ -8735,7 +8735,7 @@ static char_u *arg_all(void)
|
||||
#ifndef BACKSLASH_IN_FILENAME
|
||||
|| *p == '\\'
|
||||
#endif
|
||||
) {
|
||||
|| *p == '`') {
|
||||
// insert a backslash
|
||||
if (retval != NULL) {
|
||||
retval[len] = '\\';
|
||||
|
@ -1338,6 +1338,14 @@ func! Test_edit_rightleft()
|
||||
bw!
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user