summaryrefslogtreecommitdiffstats
path: root/runtime/scripts.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-15 12:27:09 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-15 12:27:09 +0000
commite3ce17a3ca838954728df21ccb6c2a724490203d (patch)
tree987a43ffc78ad0b50a3736c5dcbf8cbf6d5e3f07 /runtime/scripts.vim
parente1833bfd01c100896d2a01f281762c285192d84b (diff)
patch 8.2.4095: sed script not recognized by the first linev8.2.4095
Problem: Sed script not recognized by the first line. Solution: Recognize a sed script starting with "#n". (Doug Kearns)
Diffstat (limited to 'runtime/scripts.vim')
-rw-r--r--runtime/scripts.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index e41405a6c5..dd47f65ba0 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -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