forked from aniani/vim
patch 9.0.0362: expanding ":e %" does not work for remote files
Problem: Expanding ":e %" does not work for remote files. Solution: If the "%" or "#" file does not exist add the expansion anyway.
This commit is contained in:
@@ -1306,6 +1306,18 @@ func Test_cmdline_write_alternatefile()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_cmdline_expand_cur_alt_file()
|
||||
enew
|
||||
file http://some.com/file.txt
|
||||
call feedkeys(":e %\<Tab>\<C-B>\"\<CR>", 'xt')
|
||||
call assert_equal('"e http://some.com/file.txt', @:)
|
||||
edit another
|
||||
call feedkeys(":e #\<Tab>\<C-B>\"\<CR>", 'xt')
|
||||
call assert_equal('"e http://some.com/file.txt', @:)
|
||||
bwipe
|
||||
bwipe http://some.com/file.txt
|
||||
endfunc
|
||||
|
||||
" using a leading backslash here
|
||||
set cpo+=C
|
||||
|
||||
|
||||
Reference in New Issue
Block a user