mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +00: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:
@@ -4080,6 +4080,7 @@ int expand_filename(exarg_T *eap, char_u **cmdlinep, char_u **errormsgp)
|
|||||||
&& eap->cmdidx != CMD_lgrep
|
&& eap->cmdidx != CMD_lgrep
|
||||||
&& eap->cmdidx != CMD_grepadd
|
&& eap->cmdidx != CMD_grepadd
|
||||||
&& eap->cmdidx != CMD_lgrepadd
|
&& eap->cmdidx != CMD_lgrepadd
|
||||||
|
&& eap->cmdidx != CMD_hardcopy
|
||||||
&& !(eap->argt & NOSPC)
|
&& !(eap->argt & NOSPC)
|
||||||
) {
|
) {
|
||||||
char_u *l;
|
char_u *l;
|
||||||
|
@@ -61,3 +61,12 @@ func Test_with_syntax()
|
|||||||
set printoptions&
|
set printoptions&
|
||||||
endif
|
endif
|
||||||
endfunc
|
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
|
||||||
|
Reference in New Issue
Block a user