mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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 #1682)
This commit is contained in:
@@ -5042,6 +5042,7 @@ expand_filename(
|
||||
&& eap->cmdidx != CMD_lgrep
|
||||
&& eap->cmdidx != CMD_grepadd
|
||||
&& eap->cmdidx != CMD_lgrepadd
|
||||
&& eap->cmdidx != CMD_hardcopy
|
||||
#ifndef UNIX
|
||||
&& !(eap->argt & NOSPC)
|
||||
#endif
|
||||
|
@@ -60,3 +60,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
|
||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
615,
|
||||
/**/
|
||||
614,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user