mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.0615: using % with :hardcopy wrongly escapes spaces
Problem: Using % with :hardcopy wrongly escapes spaces. (Alexey Muranov)
Solution: Expand % differently. (Christian Brabandt, closes vim/vim#1682)
bf15b8d78b
This commit is contained in:
parent
a10938ae31
commit
6d4d271694
@ -4080,6 +4080,7 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
|
||||
&& eap->cmdidx != CMD_lgrep
|
||||
&& eap->cmdidx != CMD_grepadd
|
||||
&& eap->cmdidx != CMD_lgrepadd
|
||||
&& eap->cmdidx != CMD_hardcopy
|
||||
&& !(eap->argt & NOSPC)
|
||||
) {
|
||||
char_u *l;
|
||||
|
@ -61,3 +61,12 @@ func Test_with_syntax()
|
||||
set printoptions&
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func Test_fname_with_spaces()
|
||||
split t\ e\ s\ t.txt
|
||||
call setline(1, ['just', 'some', 'text'])
|
||||
hardcopy > %.ps
|
||||
call assert_true(filereadable('t e s t.txt.ps'))
|
||||
call delete('t e s t.txt.ps')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
Loading…
Reference in New Issue
Block a user