Patch 8.2.4095

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 15, 2022, 7:29:33 AM1/15/22
to vim...@googlegroups.com

Patch 8.2.4095
Problem: Sed script not recognized by the first line.
Solution: Recognize a sed script starting with "#n". (Doug Kearns)
Files: runtime/scripts.vim, src/testdir/test_filetype.vim


*** ../vim-8.2.4094/runtime/scripts.vim 2022-01-05 20:56:34.633480269 +0000
--- runtime/scripts.vim 2022-01-15 12:24:10.933200775 +0000
***************
*** 406,411 ****
--- 406,417 ----
elseif s:line1 =~# '^#.*by RouterOS.*$'
set ft=routeros

+ " Sed scripts
+ " #ncomment is allowed but most likely a false positive so require a space
+ " before any trailing comment text
+ elseif s:line1 =~# '^#n\%($\|\s\)'
+ set ft=sed
+
" CVS diff
else
let s:lnum = 1
*** ../vim-8.2.4094/src/testdir/test_filetype.vim 2022-01-13 14:49:06.698083235 +0000
--- src/testdir/test_filetype.vim 2022-01-15 12:24:10.933200775 +0000
***************
*** 654,660 ****
\ ['#!/path/nodejs'],
\ ['#!/path/rhino']],
\ 'bc': [['#!/path/bc']],
! \ 'sed': [['#!/path/sed']],
\ 'ocaml': [['#!/path/ocaml']],
\ 'awk': [['#!/path/awk'],
\ ['#!/path/gawk']],
--- 654,660 ----
\ ['#!/path/nodejs'],
\ ['#!/path/rhino']],
\ 'bc': [['#!/path/bc']],
! \ 'sed': [['#!/path/sed'], ['#n'], ['#n comment']],
\ 'ocaml': [['#!/path/ocaml']],
\ 'awk': [['#!/path/awk'],
\ ['#!/path/gawk']],
*** ../vim-8.2.4094/src/version.c 2022-01-15 10:52:08.268884075 +0000
--- src/version.c 2022-01-15 12:25:27.417056120 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4095,
/**/

--
Q: How does a UNIX Guru do Sex ?
A: unzip;strip;touch;finger;mount;fsck;more;yes;umount;sleep

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages