Mercurial > vim
changeset 11463:6fff8b86e9bd v8.0.0615
patch 8.0.0615: using % with :hardcopy wrongly escapes spaces
commit https://github.com/vim/vim/commit/bf15b8d78b22661db8b19d662b62bb9a061cdd37
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 4 20:43:48 2017 +0200
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 https://github.com/vim/vim/issues/1682)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 04 Jun 2017 20:45:05 +0200 |
parents | 2bce57faccda |
children | 8935d8847188 |
files | src/ex_docmd.c src/testdir/test_hardcopy.vim src/version.c |
diffstat | 3 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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
--- a/src/testdir/test_hardcopy.vim +++ b/src/testdir/test_hardcopy.vim @@ -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