]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.0.0615: using % with :hardcopy wrongly escapes spaces v8.0.0615
authorBram Moolenaar <Bram@vim.org>
Sun, 4 Jun 2017 18:43:48 +0000 (20:43 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 4 Jun 2017 18:43:48 +0000 (20:43 +0200)
Problem:    Using % with :hardcopy wrongly escapes spaces. (Alexey Muranov)
Solution:   Expand % differently. (Christian Brabandt, closes #1682)

src/ex_docmd.c
src/testdir/test_hardcopy.vim
src/version.c

index 2c9c8782e748740525e3675f1ac70046929e38fc..bf340de4057b445ec2a42bd1e6af07255c582867 100644 (file)
@@ -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
index ea9790d134180a69cc7d860748aaff4949ec33a5..2a316d4f0f689830eeb17695e4312c97d47cc803 100644 (file)
@@ -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
index d312148ee88f1fcc036df9b3805907cb441de3f7..c0711fb84d7b199513bd84649ee546c09b9faad2 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    615,
 /**/
     614,
 /**/