mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 21:37:43 +00:00
vim-patch:7.4.1654
Problem: Crash when using expand('%:S') in a buffer without a name.
Solution: Don't set a NUL. (James McCoy, closes vim/vim#714)
52c6eaffd4
This commit is contained in:
@@ -54,6 +54,12 @@ describe('filename modifiers', function()
|
||||
set shell=tcsh
|
||||
call assert_equal("'abc\\\ndef'", fnamemodify("abc\ndef", ':S'))
|
||||
endfunc
|
||||
|
||||
func Test_expand()
|
||||
new
|
||||
call assert_equal("", expand('%:S'))
|
||||
quit
|
||||
endfunc
|
||||
]=])
|
||||
end)
|
||||
|
||||
@@ -61,4 +67,9 @@ describe('filename modifiers', function()
|
||||
call('Test_fnamemodify')
|
||||
expected_empty()
|
||||
end)
|
||||
|
||||
it('works for :S in an unnamed buffer', function()
|
||||
call('Test_expand')
|
||||
expected_empty()
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user