aboutsummaryrefslogtreecommitdiff
path: root/runtime/scripts.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-01-15 14:47:25 +0100
committerGitHub <noreply@github.com>2022-01-15 14:47:25 +0100
commitc09147aad99a88dc39c47c276b431ade4c83ac9d (patch)
tree6a44248ff4ee0d1e5b7951b52a8e04c023e4b9a7 /runtime/scripts.vim
parent574a5822023939d534d922eaa345bb7e0633d2b8 (diff)
downloadrneovim-c09147aad99a88dc39c47c276b431ade4c83ac9d.tar.gz
rneovim-c09147aad99a88dc39c47c276b431ade4c83ac9d.tar.bz2
rneovim-c09147aad99a88dc39c47c276b431ade4c83ac9d.zip
vim-patch:8.2.4095: sed script not recognized by the first line (#17101)
Problem: Sed script not recognized by the first line. Solution: Recognize a sed script starting with "#n". (Doug Kearns) https://github.com/vim/vim/commit/e3ce17a3ca838954728df21ccb6c2a724490203d
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