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)
This commit is contained in:
Bram Moolenaar
2022-01-15 12:27:09 +00:00
parent e1833bfd01
commit e3ce17a3ca
3 changed files with 9 additions and 1 deletions

View File

@ -406,6 +406,12 @@ else
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