home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.191 < prev    next >
Encoding:
Internet Message Format  |  2014-02-22  |  26.9 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.191
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.191
  11. Problem:    Escaping a file name for shell commands can't be done without a
  12.             function.
  13. Solution:   Add the :S file name modifier.
  14. Files:      src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
  15.             src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
  16.             src/testdir/Make_vms.mms, src/testdir/Makefile,
  17.             src/testdir/test105.in, src/testdir/test105.ok,
  18.             runtime/doc/cmdline.txt, runtime/doc/eval.txt,
  19.             runtime/doc/map.txt, runtime/doc/options.txt,
  20.             runtime/doc/quickfix.txt, runtime/doc/usr_30.txt,
  21.             runtime/doc/usr_40.txt, runtime/doc/usr_42.txt,
  22.             runtime/doc/vi_diff.txt, src/eval.c, src/misc2.c, src/normal.c,
  23.             src/proto/misc2.pro
  24.  
  25.  
  26. *** ../vim-7.4.190/src/testdir/Make_amiga.mak    2014-02-05 22:25:29.974568243 +0100
  27. --- src/testdir/Make_amiga.mak    2014-02-23 23:16:51.056762395 +0100
  28. ***************
  29. *** 35,41 ****
  30.           test89.out test90.out test91.out test92.out test93.out \
  31.           test94.out test95.out test96.out test97.out test98.out \
  32.           test99.out test100.out test101.out test102.out test103.out \
  33. !         test104.out
  34.   
  35.   .SUFFIXES: .in .out
  36.   
  37. --- 35,41 ----
  38.           test89.out test90.out test91.out test92.out test93.out \
  39.           test94.out test95.out test96.out test97.out test98.out \
  40.           test99.out test100.out test101.out test102.out test103.out \
  41. !         test104.out test105.out
  42.   
  43.   .SUFFIXES: .in .out
  44.   
  45. ***************
  46. *** 156,158 ****
  47. --- 156,159 ----
  48.   test102.out: test102.in
  49.   test103.out: test103.in
  50.   test104.out: test104.in
  51. + test105.out: test105.in
  52. *** ../vim-7.4.190/src/testdir/Make_dos.mak    2014-02-05 22:25:29.978568243 +0100
  53. --- src/testdir/Make_dos.mak    2014-02-23 23:17:41.840762314 +0100
  54. ***************
  55. *** 33,39 ****
  56.           test84.out test85.out test86.out test87.out test88.out \
  57.           test89.out test90.out test91.out test92.out test93.out \
  58.           test94.out test95.out test96.out test98.out test99.out \
  59. !         test100.out test101.out test102.out test103.out test104.out
  60.   
  61.   SCRIPTS32 =    test50.out test70.out
  62.   
  63. --- 33,40 ----
  64.           test84.out test85.out test86.out test87.out test88.out \
  65.           test89.out test90.out test91.out test92.out test93.out \
  66.           test94.out test95.out test96.out test98.out test99.out \
  67. !         test100.out test101.out test102.out test103.out test104.out \
  68. !         test105.out
  69.   
  70.   SCRIPTS32 =    test50.out test70.out
  71.   
  72. *** ../vim-7.4.190/src/testdir/Make_ming.mak    2014-02-05 22:25:29.978568243 +0100
  73. --- src/testdir/Make_ming.mak    2014-02-23 23:17:29.400762333 +0100
  74. ***************
  75. *** 53,59 ****
  76.           test84.out test85.out test86.out test87.out test88.out \
  77.           test89.out test90.out test91.out test92.out test93.out \
  78.           test94.out test95.out test96.out test98.out test99.out \
  79. !         test100.out test101.out test102.out test103.out test104.out
  80.   
  81.   SCRIPTS32 =    test50.out test70.out
  82.   
  83. --- 53,60 ----
  84.           test84.out test85.out test86.out test87.out test88.out \
  85.           test89.out test90.out test91.out test92.out test93.out \
  86.           test94.out test95.out test96.out test98.out test99.out \
  87. !         test100.out test101.out test102.out test103.out test104.out \
  88. !         test105.out
  89.   
  90.   SCRIPTS32 =    test50.out test70.out
  91.   
  92. *** ../vim-7.4.190/src/testdir/Make_os2.mak    2014-02-05 22:25:29.978568243 +0100
  93. --- src/testdir/Make_os2.mak    2014-02-23 23:17:49.476762302 +0100
  94. ***************
  95. *** 35,41 ****
  96.           test81.out test82.out test83.out test84.out test88.out \
  97.           test89.out test90.out test91.out test92.out test93.out \
  98.           test94.out test95.out test96.out test98.out test99.out \
  99. !         test100.out test101.out test102.out test103.out test104.out
  100.   
  101.   .SUFFIXES: .in .out
  102.   
  103. --- 35,42 ----
  104.           test81.out test82.out test83.out test84.out test88.out \
  105.           test89.out test90.out test91.out test92.out test93.out \
  106.           test94.out test95.out test96.out test98.out test99.out \
  107. !         test100.out test101.out test102.out test103.out test104.out \
  108. !         test105.out
  109.   
  110.   .SUFFIXES: .in .out
  111.   
  112. *** ../vim-7.4.190/src/testdir/Make_vms.mms    2014-02-05 22:25:29.978568243 +0100
  113. --- src/testdir/Make_vms.mms    2014-02-23 23:17:56.596762290 +0100
  114. ***************
  115. *** 4,10 ****
  116.   # Authors:    Zoltan Arpadffy, <arpadffy@polarhome.com>
  117.   #        Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
  118.   #
  119. ! # Last change:  2013 Nov 21
  120.   #
  121.   # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
  122.   # Edit the lines in the Configuration section below to select.
  123. --- 4,10 ----
  124.   # Authors:    Zoltan Arpadffy, <arpadffy@polarhome.com>
  125.   #        Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
  126.   #
  127. ! # Last change:  2014 Feb 23
  128.   #
  129.   # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
  130.   # Edit the lines in the Configuration section below to select.
  131. ***************
  132. *** 79,85 ****
  133.        test82.out test83.out test84.out test88.out test89.out \
  134.        test90.out test91.out test92.out test93.out test94.out \
  135.        test95.out test96.out test97.out test98.out test99.out \
  136. !      test100.out test101.out test102.out test103.out test104.out
  137.   
  138.   # Known problems:
  139.   # Test 30: a problem around mac format - unknown reason
  140. --- 79,86 ----
  141.        test82.out test83.out test84.out test88.out test89.out \
  142.        test90.out test91.out test92.out test93.out test94.out \
  143.        test95.out test96.out test97.out test98.out test99.out \
  144. !      test100.out test101.out test102.out test103.out test104.out \
  145. !      test105.out
  146.   
  147.   # Known problems:
  148.   # Test 30: a problem around mac format - unknown reason
  149. *** ../vim-7.4.190/src/testdir/Makefile    2014-02-05 22:25:29.982568243 +0100
  150. --- src/testdir/Makefile    2014-02-23 23:18:14.040762262 +0100
  151. ***************
  152. *** 31,37 ****
  153.           test89.out test90.out test91.out test92.out test93.out \
  154.           test94.out test95.out test96.out test97.out test98.out \
  155.           test99.out test100.out test101.out test102.out test103.out \
  156. !         test104.out
  157.   
  158.   SCRIPTS_GUI = test16.out
  159.   
  160. --- 31,37 ----
  161.           test89.out test90.out test91.out test92.out test93.out \
  162.           test94.out test95.out test96.out test97.out test98.out \
  163.           test99.out test100.out test101.out test102.out test103.out \
  164. !         test104.out test105.out
  165.   
  166.   SCRIPTS_GUI = test16.out
  167.   
  168. *** ../vim-7.4.190/src/testdir/test105.in    2014-02-23 23:35:40.680760596 +0100
  169. --- src/testdir/test105.in    2014-02-23 23:30:24.748761099 +0100
  170. ***************
  171. *** 0 ****
  172. --- 1,45 ----
  173. + Test filename modifiers     vim: set ft=vim :
  174. + STARTTEST
  175. + :source small.vim
  176. + :%delete _
  177. + :set shell=sh
  178. + :set shellslash
  179. + :let tab="\t"
  180. + :command -nargs=1 Put :let expr=<q-args> | $put =expr.tab.strtrans(string(eval(expr)))
  181. + :let $HOME=fnamemodify('.', ':p:h:h:h')
  182. + :Put fnamemodify('.',              ':p'      )[-1:]
  183. + :Put fnamemodify('.',              ':p:h'    )[-1:]
  184. + :Put fnamemodify('test.out',       ':p'      )[-1:]
  185. + :Put fnamemodify('test.out',       ':.'      )
  186. + :Put fnamemodify('../testdir/a',   ':.'      )
  187. + :Put fnamemodify('test.out',       ':~'      )
  188. + :Put fnamemodify('../testdir/a',   ':~'      )
  189. + :Put fnamemodify('../testdir/a',   ':t'      )
  190. + :Put fnamemodify('.',              ':p:t'    )
  191. + :Put fnamemodify('test.out',       ':p:t'    )
  192. + :Put fnamemodify('test.out',       ':p:e'    )
  193. + :Put fnamemodify('test.out',       ':p:t:e'  )
  194. + :Put fnamemodify('abc.fb2.tar.gz', ':r'      )
  195. + :Put fnamemodify('abc.fb2.tar.gz', ':r:r'    )
  196. + :Put fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )
  197. + :Put substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')
  198. + :Put fnamemodify('abc.fb2.tar.gz', ':e'      )
  199. + :Put fnamemodify('abc.fb2.tar.gz', ':e:e'    )
  200. + :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )
  201. + :Put fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')
  202. + :Put fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )
  203. + :Put fnamemodify('abc def',        ':S'      )
  204. + :Put fnamemodify('abc" "def',      ':S'      )
  205. + :Put fnamemodify('abc"%"def',      ':S'      )
  206. + :Put fnamemodify('abc'' ''def',    ':S'      )
  207. + :Put fnamemodify('abc''%''def',    ':S'      )
  208. + :Put fnamemodify("abc\ndef",       ':S'      )
  209. + :set shell=tcsh
  210. + :Put fnamemodify("abc\ndef",       ':S'      )
  211. + :$put ='vim: ts=8'
  212. + :1 delete _
  213. + :w! test.out
  214. + :qa!
  215. + ENDTEST
  216. *** ../vim-7.4.190/src/testdir/test105.ok    2014-02-23 23:35:40.688760596 +0100
  217. --- src/testdir/test105.ok    2014-02-23 23:32:11.204760929 +0100
  218. ***************
  219. *** 0 ****
  220. --- 1,29 ----
  221. + fnamemodify('.',              ':p'      )[-1:]    '/'
  222. + fnamemodify('.',              ':p:h'    )[-1:]    'r'
  223. + fnamemodify('test.out',       ':p'      )[-1:]    't'
  224. + fnamemodify('test.out',       ':.'      )    'test.out'
  225. + fnamemodify('../testdir/a',   ':.'      )    'a'
  226. + fnamemodify('test.out',       ':~'      )    '~/src/testdir/test.out'
  227. + fnamemodify('../testdir/a',   ':~'      )    '~/src/testdir/a'
  228. + fnamemodify('../testdir/a',   ':t'      )    'a'
  229. + fnamemodify('.',              ':p:t'    )    ''
  230. + fnamemodify('test.out',       ':p:t'    )    'test.out'
  231. + fnamemodify('test.out',       ':p:e'    )    'out'
  232. + fnamemodify('test.out',       ':p:t:e'  )    'out'
  233. + fnamemodify('abc.fb2.tar.gz', ':r'      )    'abc.fb2.tar'
  234. + fnamemodify('abc.fb2.tar.gz', ':r:r'    )    'abc.fb2'
  235. + fnamemodify('abc.fb2.tar.gz', ':r:r:r'  )    'abc'
  236. + substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(src/testdir/.*\)', '\1', '')    'src/testdir/abc.fb2'
  237. + fnamemodify('abc.fb2.tar.gz', ':e'      )    'gz'
  238. + fnamemodify('abc.fb2.tar.gz', ':e:e'    )    'tar.gz'
  239. + fnamemodify('abc.fb2.tar.gz', ':e:e:e'  )    'fb2.tar.gz'
  240. + fnamemodify('abc.fb2.tar.gz', ':e:e:e:e')    'fb2.tar.gz'
  241. + fnamemodify('abc.fb2.tar.gz', ':e:e:r'  )    'tar'
  242. + fnamemodify('abc def',        ':S'      )    '''abc def'''
  243. + fnamemodify('abc" "def',      ':S'      )    '''abc" "def'''
  244. + fnamemodify('abc"%"def',      ':S'      )    '''abc"%"def'''
  245. + fnamemodify('abc'' ''def',    ':S'      )    '''abc''\'''' ''\''''def'''
  246. + fnamemodify('abc''%''def',    ':S'      )    '''abc''\''''%''\''''def'''
  247. + fnamemodify("abc\ndef",       ':S'      )    '''abc^@def'''
  248. + fnamemodify("abc\ndef",       ':S'      )    '''abc\^@def'''
  249. + vim: ts=8
  250. *** ../vim-7.4.190/runtime/doc/cmdline.txt    2013-11-09 05:30:18.000000000 +0100
  251. --- runtime/doc/cmdline.txt    2014-02-23 23:20:57.020762003 +0100
  252. ***************
  253. *** 758,763 ****
  254. --- 758,764 ----
  255.   function expand() |expand()|.
  256.       %    Is replaced with the current file name.          *:_%* *c_%*
  257.       #    Is replaced with the alternate file name.      *:_#* *c_#*
  258. +         This is remembered for every window.
  259.       #n    (where n is a number) is replaced with          *:_#0* *:_#n*
  260.           the file name of buffer n.  "#0" is the same as "#".     *c_#n*
  261.       ##    Is replaced with all names in the argument list      *:_##* *c_##*
  262. ***************
  263. *** 823,830 ****
  264.              the start of the function.
  265.   
  266.                                *filename-modifiers*
  267. !      *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
  268. !             *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs*
  269.   The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
  270.   "<afile>" or "<abuf>".  They are also used with the |fnamemodify()| function.
  271.   These are not available when Vim has been compiled without the |+modify_fname|
  272. --- 824,831 ----
  273.              the start of the function.
  274.   
  275.                                *filename-modifiers*
  276. ! *:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*
  277. !      *%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs* *%:S*
  278.   The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
  279.   "<afile>" or "<abuf>".  They are also used with the |fnamemodify()| function.
  280.   These are not available when Vim has been compiled without the |+modify_fname|
  281. ***************
  282. *** 879,884 ****
  283. --- 880,889 ----
  284.       :gs?pat?sub?
  285.           Substitute all occurrences of "pat" with "sub".  Otherwise
  286.           this works like ":s".
  287. +     :S    Escape special characters for use with a shell command (see 
  288. +         |shellescape()|). Must be the last one. Examples: >
  289. +             :!dir <cfile>:S
  290. +             :call system('chmod +w -- ' . expand('%:S'))
  291.   
  292.   Examples, when the file name is "src/version.c", current dir
  293.   "/home/mool/vim": >
  294. *** ../vim-7.4.190/runtime/doc/eval.txt    2014-01-14 12:33:32.000000000 +0100
  295. --- runtime/doc/eval.txt    2014-02-23 23:19:32.420762138 +0100
  296. ***************
  297. *** 5414,5419 ****
  298. --- 5428,5434 ----
  299.   <        This results in a directory listing for the file under the
  300.           cursor.  Example of use with |system()|: >
  301.               :call system("chmod +w -- " . shellescape(expand("%")))
  302. + <        See also |::S|.
  303.   
  304.   
  305.   shiftwidth()                        *shiftwidth()*
  306. ***************
  307. *** 5896,5909 ****
  308.           passed as stdin to the command.  The string is written as-is,
  309.           you need to take care of using the correct line separators
  310.           yourself.  Pipes are not used.
  311. !         Note: Use |shellescape()| to escape special characters in a
  312. !         command argument.  Newlines in {expr} may cause the command to
  313. !         fail.  The characters in 'shellquote' and 'shellxquote' may
  314. !         also cause trouble.
  315.           This is not to be used for interactive commands.
  316.   
  317.           The result is a String.  Example: >
  318.               :let files = system("ls " .  shellescape(expand('%:h')))
  319.   
  320.   <        To make the result more system-independent, the shell output
  321.           is filtered to replace <CR> with <NL> for Macintosh, and
  322. --- 5911,5926 ----
  323.           passed as stdin to the command.  The string is written as-is,
  324.           you need to take care of using the correct line separators
  325.           yourself.  Pipes are not used.
  326. !         Note: Use |shellescape()| or |::S| with |expand()| or 
  327. !         |fnamemodify()| to escape special characters in a command 
  328. !         argument.  Newlines in {expr} may cause the command to fail.  
  329. !         The characters in 'shellquote' and 'shellxquote' may also 
  330. !         cause trouble.
  331.           This is not to be used for interactive commands.
  332.   
  333.           The result is a String.  Example: >
  334.               :let files = system("ls " .  shellescape(expand('%:h')))
  335. +             :let files = system('ls ' . expand('%:h:S'))
  336.   
  337.   <        To make the result more system-independent, the shell output
  338.           is filtered to replace <CR> with <NL> for Macintosh, and
  339. *** ../vim-7.4.190/runtime/doc/map.txt    2013-08-10 13:24:56.000000000 +0200
  340. --- runtime/doc/map.txt    2014-02-23 23:19:32.424762138 +0100
  341. ***************
  342. *** 380,386 ****
  343.      The simplest way to load a set of related language mappings is by using the
  344.   'keymap' option.  See |45.5|.
  345.      In Insert mode and in Command-line mode the mappings can be disabled with
  346. ! the CTRL-^ command |i_CTRL-^| |c_CTRL-^| These commands change the value of
  347.   the 'iminsert' option.  When starting to enter a normal command line (not a
  348.   search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
  349.   last used is remembered for Insert mode and Search patterns separately.  The
  350. --- 380,386 ----
  351.      The simplest way to load a set of related language mappings is by using the
  352.   'keymap' option.  See |45.5|.
  353.      In Insert mode and in Command-line mode the mappings can be disabled with
  354. ! the CTRL-^ command |i_CTRL-^| |c_CTRL-^|. These commands change the value of
  355.   the 'iminsert' option.  When starting to enter a normal command line (not a
  356.   search pattern) the mappings are disabled until a CTRL-^ is typed.  The state
  357.   last used is remembered for Insert mode and Search patterns separately.  The
  358. ***************
  359. *** 593,599 ****
  360.   When you have a mapping that contains an Ex command, you need to put a line
  361.   terminator after it to have it executed.  The use of <CR> is recommended for
  362.   this (see |<>|).  Example: >
  363. !    :map  _ls  :!ls -l %<CR>:echo "the end"<CR>
  364.   
  365.   To avoid mapping of the characters you type in insert or Command-line mode,
  366.   type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
  367. --- 593,599 ----
  368.   When you have a mapping that contains an Ex command, you need to put a line
  369.   terminator after it to have it executed.  The use of <CR> is recommended for
  370.   this (see |<>|).  Example: >
  371. !    :map  _ls  :!ls -l %:S<CR>:echo "the end"<CR>
  372.   
  373.   To avoid mapping of the characters you type in insert or Command-line mode,
  374.   type a CTRL-V first.  The mapping in Insert mode is disabled if the 'paste'
  375. *** ../vim-7.4.190/runtime/doc/options.txt    2013-11-12 04:43:57.000000000 +0100
  376. --- runtime/doc/options.txt    2014-02-23 23:19:32.428762138 +0100
  377. ***************
  378. *** 4757,4764 ****
  379.               global or local to buffer |global-local|
  380.               {not in Vi}
  381.       Program to use for the ":make" command.  See |:make_makeprg|.
  382. !     This option may contain '%' and '#' characters, which are expanded to
  383. !     the current and alternate file name. |:_%| |:_#|
  384.       Environment variables are expanded |:set_env|.  See |option-backslash|
  385.       about including spaces and backslashes.
  386.       Note that a '|' must be escaped twice: once for ":set" and once for
  387. --- 4757,4765 ----
  388.               global or local to buffer |global-local|
  389.               {not in Vi}
  390.       Program to use for the ":make" command.  See |:make_makeprg|.
  391. !     This option may contain '%' and '#' characters (see  |:_%| and |:_#|), 
  392. !     which are expanded to the current and alternate file name.  Use |::S| 
  393. !     to escape file names in case they contain special characters.
  394.       Environment variables are expanded |:set_env|.  See |option-backslash|
  395.       about including spaces and backslashes.
  396.       Note that a '|' must be escaped twice: once for ":set" and once for
  397. *** ../vim-7.4.190/runtime/doc/quickfix.txt    2013-08-10 13:25:00.000000000 +0200
  398. --- runtime/doc/quickfix.txt    2014-02-23 23:19:32.432762138 +0100
  399. ***************
  400. *** 838,844 ****
  401.   The alltests.py script seems to be used quite often, that's all.
  402.   Useful values for the 'makeprg' options therefore are:
  403.    setlocal makeprg=./alltests.py " Run a testsuite
  404. !  setlocal makeprg=python %      " Run a single testcase
  405.   
  406.   Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
  407.   
  408. --- 838,844 ----
  409.   The alltests.py script seems to be used quite often, that's all.
  410.   Useful values for the 'makeprg' options therefore are:
  411.    setlocal makeprg=./alltests.py " Run a testsuite
  412. !  setlocal makeprg=python\ %:S   " Run a single testcase
  413.   
  414.   Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
  415.   
  416. ***************
  417. *** 1332,1338 ****
  418.   Here is an alternative from Michael F. Lamb for Unix that filters the errors
  419.   first: >
  420.     :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
  421. !   :setl makeprg=javac\ %\ 2>&1\ \\\|\ vim-javac-filter
  422.   
  423.   You need to put the following in "vim-javac-filter" somewhere in your path
  424.   (e.g., in ~/bin) and make it executable: >
  425. --- 1332,1338 ----
  426.   Here is an alternative from Michael F. Lamb for Unix that filters the errors
  427.   first: >
  428.     :setl errorformat=%Z%f:%l:\ %m,%A%p^,%-G%*[^sl]%.%#
  429. !   :setl makeprg=javac\ %:S\ 2>&1\ \\\|\ vim-javac-filter
  430.   
  431.   You need to put the following in "vim-javac-filter" somewhere in your path
  432.   (e.g., in ~/bin) and make it executable: >
  433. *** ../vim-7.4.190/runtime/doc/usr_30.txt    2013-08-10 13:25:05.000000000 +0200
  434. --- runtime/doc/usr_30.txt    2014-02-23 23:19:32.432762138 +0100
  435. ***************
  436. *** 128,134 ****
  437.   You can include special Vim keywords in the command specification.  The %
  438.   character expands to the name of the current file.  So if you execute the
  439.   command: >
  440. !     :set makeprg=make\ %
  441.   
  442.   When you are editing main.c, then ":make" executes the following command: >
  443.   
  444. --- 128,134 ----
  445.   You can include special Vim keywords in the command specification.  The %
  446.   character expands to the name of the current file.  So if you execute the
  447.   command: >
  448. !     :set makeprg=make\ %:S
  449.   
  450.   When you are editing main.c, then ":make" executes the following command: >
  451.   
  452. ***************
  453. *** 137,143 ****
  454.   This is not too useful, so you will refine the command a little and use the :r
  455.   (root) modifier: >
  456.   
  457. !     :set makeprg=make\ %:r.o
  458.   
  459.   Now the command executed is as follows: >
  460.   
  461. --- 137,143 ----
  462.   This is not too useful, so you will refine the command a little and use the :r
  463.   (root) modifier: >
  464.   
  465. !     :set makeprg=make\ %:r:S.o
  466.   
  467.   Now the command executed is as follows: >
  468.   
  469. *** ../vim-7.4.190/runtime/doc/usr_40.txt    2013-08-10 13:25:05.000000000 +0200
  470. --- runtime/doc/usr_40.txt    2014-02-23 23:19:32.432762138 +0100
  471. ***************
  472. *** 209,215 ****
  473.   separates the two commands.  This also means that a | character can't be used
  474.   inside a map command.  To include one, use <Bar> (five characters).  Example:
  475.   >
  476. !     :map <F8> :write <Bar> !checkin %<CR>
  477.   
  478.   The same problem applies to the ":unmap" command, with the addition that you
  479.   have to watch out for trailing white space.  These two commands are different:
  480. --- 209,215 ----
  481.   separates the two commands.  This also means that a | character can't be used
  482.   inside a map command.  To include one, use <Bar> (five characters).  Example:
  483.   >
  484. !     :map <F8> :write <Bar> !checkin %:S<CR>
  485.   
  486.   The same problem applies to the ":unmap" command, with the addition that you
  487.   have to watch out for trailing white space.  These two commands are different:
  488. *** ../vim-7.4.190/runtime/doc/usr_42.txt    2013-08-10 13:25:05.000000000 +0200
  489. --- runtime/doc/usr_42.txt    2014-02-23 23:19:32.432762138 +0100
  490. ***************
  491. *** 311,317 ****
  492.   item with a bitmap.  For example, define a new toolbar item with: >
  493.   
  494.       :tmenu ToolBar.Compile  Compile the current file
  495. !     :amenu ToolBar.Compile  :!cc % -o %:r<CR>
  496.   
  497.   Now you need to create the icon.  For MS-Windows it must be in bitmap format,
  498.   with the name "Compile.bmp".  For Unix XPM format is used, the file name is
  499. --- 311,317 ----
  500.   item with a bitmap.  For example, define a new toolbar item with: >
  501.   
  502.       :tmenu ToolBar.Compile  Compile the current file
  503. !     :amenu ToolBar.Compile  :!cc %:S -o %:r:S<CR>
  504.   
  505.   Now you need to create the icon.  For MS-Windows it must be in bitmap format,
  506.   with the name "Compile.bmp".  For Unix XPM format is used, the file name is
  507. *** ../vim-7.4.190/runtime/doc/vi_diff.txt    2013-08-10 13:25:07.000000000 +0200
  508. --- runtime/doc/vi_diff.txt    2014-02-23 23:19:32.432762138 +0100
  509. ***************
  510. *** 540,546 ****
  511.   Added :wnext command.  Same as ":write" followed by ":next".
  512.   
  513.   The ":w!" command always writes, also when the file is write protected.  In Vi
  514. ! you would have to do ":!chmod +w %" and ":set noro".
  515.   
  516.   When 'tildeop' has been set, "~" is an operator (must be followed by a
  517.   movement command).
  518. --- 540,546 ----
  519.   Added :wnext command.  Same as ":write" followed by ":next".
  520.   
  521.   The ":w!" command always writes, also when the file is write protected.  In Vi
  522. ! you would have to do ":!chmod +w %:S" and ":set noro".
  523.   
  524.   When 'tildeop' has been set, "~" is an operator (must be followed by a
  525.   movement command).
  526. *** ../vim-7.4.190/src/eval.c    2014-02-23 22:54:54.724764490 +0100
  527. --- src/eval.c    2014-02-23 23:19:32.432762138 +0100
  528. ***************
  529. *** 16950,16956 ****
  530.       typval_T    *rettv;
  531.   {
  532.       rettv->vval.v_string = vim_strsave_shellescape(
  533. !                get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]));
  534.       rettv->v_type = VAR_STRING;
  535.   }
  536.   
  537. --- 16950,16956 ----
  538.       typval_T    *rettv;
  539.   {
  540.       rettv->vval.v_string = vim_strsave_shellescape(
  541. !         get_tv_string(&argvars[0]), non_zero_arg(&argvars[1]), TRUE);
  542.       rettv->v_type = VAR_STRING;
  543.   }
  544.   
  545. ***************
  546. *** 24355,24360 ****
  547. --- 24355,24371 ----
  548.       }
  549.       }
  550.   
  551. +     if (src[*usedlen] == ':' && src[*usedlen + 1] == 'S')
  552. +     {
  553. +     p = vim_strsave_shellescape(*fnamep, FALSE, FALSE);
  554. +     if (p == NULL)
  555. +         return -1;
  556. +     vim_free(*bufp);
  557. +     *bufp = *fnamep = p;
  558. +     *fnamelen = (int)STRLEN(p);
  559. +     *usedlen += 2;
  560. +     }
  561.       return valid;
  562.   }
  563.   
  564. *** ../vim-7.4.190/src/misc2.c    2014-01-06 06:18:44.000000000 +0100
  565. --- src/misc2.c    2014-02-23 23:25:44.168761546 +0100
  566. ***************
  567. *** 1369,1380 ****
  568.    * Escape a newline, depending on the 'shell' option.
  569.    * When "do_special" is TRUE also replace "!", "%", "#" and things starting
  570.    * with "<" like "<cfile>".
  571.    * Returns the result in allocated memory, NULL if we have run out.
  572.    */
  573.       char_u *
  574. ! vim_strsave_shellescape(string, do_special)
  575.       char_u    *string;
  576.       int        do_special;
  577.   {
  578.       unsigned    length;
  579.       char_u    *p;
  580. --- 1369,1382 ----
  581.    * Escape a newline, depending on the 'shell' option.
  582.    * When "do_special" is TRUE also replace "!", "%", "#" and things starting
  583.    * with "<" like "<cfile>".
  584. +  * When "do_newline" is FALSE do not escape newline unless it is csh shell.
  585.    * Returns the result in allocated memory, NULL if we have run out.
  586.    */
  587.       char_u *
  588. ! vim_strsave_shellescape(string, do_special, do_newline)
  589.       char_u    *string;
  590.       int        do_special;
  591. +     int        do_newline;
  592.   {
  593.       unsigned    length;
  594.       char_u    *p;
  595. ***************
  596. *** 1403,1409 ****
  597.   # endif
  598.       if (*p == '\'')
  599.           length += 3;        /* ' => '\'' */
  600. !     if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
  601.       {
  602.           ++length;            /* insert backslash */
  603.           if (csh_like && do_special)
  604. --- 1405,1412 ----
  605.   # endif
  606.       if (*p == '\'')
  607.           length += 3;        /* ' => '\'' */
  608. !     if ((*p == '\n' && (csh_like || do_newline))
  609. !         || (*p == '!' && (csh_like || do_special)))
  610.       {
  611.           ++length;            /* insert backslash */
  612.           if (csh_like && do_special)
  613. ***************
  614. *** 1454,1460 ****
  615.           ++p;
  616.           continue;
  617.           }
  618. !         if (*p == '\n' || (*p == '!' && (csh_like || do_special)))
  619.           {
  620.           *d++ = '\\';
  621.           if (csh_like && do_special)
  622. --- 1457,1464 ----
  623.           ++p;
  624.           continue;
  625.           }
  626. !         if ((*p == '\n' && (csh_like || do_newline))
  627. !             || (*p == '!' && (csh_like || do_special)))
  628.           {
  629.           *d++ = '\\';
  630.           if (csh_like && do_special)
  631. *** ../vim-7.4.190/src/normal.c    2014-02-22 23:49:30.268896843 +0100
  632. --- src/normal.c    2014-02-23 23:19:32.436762138 +0100
  633. ***************
  634. *** 5790,5796 ****
  635.       {
  636.       /* Escape the argument properly for a shell command */
  637.       ptr = vim_strnsave(ptr, n);
  638. !     p = vim_strsave_shellescape(ptr, TRUE);
  639.       vim_free(ptr);
  640.       if (p == NULL)
  641.       {
  642. --- 5790,5796 ----
  643.       {
  644.       /* Escape the argument properly for a shell command */
  645.       ptr = vim_strnsave(ptr, n);
  646. !     p = vim_strsave_shellescape(ptr, TRUE, TRUE);
  647.       vim_free(ptr);
  648.       if (p == NULL)
  649.       {
  650. *** ../vim-7.4.190/src/proto/misc2.pro    2013-08-10 13:37:20.000000000 +0200
  651. --- src/proto/misc2.pro    2014-02-23 23:19:32.436762138 +0100
  652. ***************
  653. *** 32,38 ****
  654.   char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
  655.   char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
  656.   int csh_like_shell __ARGS((void));
  657. ! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special));
  658.   char_u *vim_strsave_up __ARGS((char_u *string));
  659.   char_u *vim_strnsave_up __ARGS((char_u *string, int len));
  660.   void vim_strup __ARGS((char_u *p));
  661. --- 32,38 ----
  662.   char_u *vim_strsave_escaped __ARGS((char_u *string, char_u *esc_chars));
  663.   char_u *vim_strsave_escaped_ext __ARGS((char_u *string, char_u *esc_chars, int cc, int bsl));
  664.   int csh_like_shell __ARGS((void));
  665. ! char_u *vim_strsave_shellescape __ARGS((char_u *string, int do_special, int do_newline));
  666.   char_u *vim_strsave_up __ARGS((char_u *string));
  667.   char_u *vim_strnsave_up __ARGS((char_u *string, int len));
  668.   void vim_strup __ARGS((char_u *p));
  669. *** ../vim-7.4.190/src/version.c    2014-02-23 22:58:12.072764176 +0100
  670. --- src/version.c    2014-02-23 23:35:51.044760579 +0100
  671. ***************
  672. *** 740,741 ****
  673. --- 740,743 ----
  674.   {   /* Add new patch number below this line */
  675. + /**/
  676. +     191,
  677.   /**/
  678.  
  679. -- 
  680. Windows
  681. M!uqoms
  682.  
  683.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  684. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  685. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  686.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  687.