diff options
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_edit.vim | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 03f1446265..6586d82fae 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -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] = '\\'; diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 989adfce8f..b1fce07f39 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -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 |