• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisão0b5ce27d8b68cd35791a8d6b9f177153346fdf07 (tree)
Hora2022-01-15 21:30:03
AutorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Mensagem de Log

patch 8.2.4095: sed script not recognized by the first line

Commit: https://github.com/vim/vim/commit/e3ce17a3ca838954728df21ccb6c2a724490203d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 15 12:27:09 2022 +0000

patch 8.2.4095: sed script not recognized by the first line
Problem: Sed script not recognized by the first line.
Solution: Recognize a sed script starting with "#n". (Doug Kearns)

Mudança Sumário

Diff

diff -r 548a6a5417c8 -r 0b5ce27d8b68 runtime/scripts.vim
--- a/runtime/scripts.vim Sat Jan 15 12:00:04 2022 +0100
+++ b/runtime/scripts.vim Sat Jan 15 13:30:03 2022 +0100
@@ -406,6 +406,12 @@
406406 elseif s:line1 =~# '^#.*by RouterOS.*$'
407407 set ft=routeros
408408
409+ " Sed scripts
410+ " #ncomment is allowed but most likely a false positive so require a space
411+ " before any trailing comment text
412+ elseif s:line1 =~# '^#n\%($\|\s\)'
413+ set ft=sed
414+
409415 " CVS diff
410416 else
411417 let s:lnum = 1
diff -r 548a6a5417c8 -r 0b5ce27d8b68 src/testdir/test_filetype.vim
--- a/src/testdir/test_filetype.vim Sat Jan 15 12:00:04 2022 +0100
+++ b/src/testdir/test_filetype.vim Sat Jan 15 13:30:03 2022 +0100
@@ -654,7 +654,7 @@
654654 \ ['#!/path/nodejs'],
655655 \ ['#!/path/rhino']],
656656 \ 'bc': [['#!/path/bc']],
657- \ 'sed': [['#!/path/sed']],
657+ \ 'sed': [['#!/path/sed'], ['#n'], ['#n comment']],
658658 \ 'ocaml': [['#!/path/ocaml']],
659659 \ 'awk': [['#!/path/awk'],
660660 \ ['#!/path/gawk']],
diff -r 548a6a5417c8 -r 0b5ce27d8b68 src/version.c
--- a/src/version.c Sat Jan 15 12:00:04 2022 +0100
+++ b/src/version.c Sat Jan 15 13:30:03 2022 +0100
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 4095,
755+/**/
754756 4094,
755757 /**/
756758 4093,
Show on old repository browser