Commit: runtime(hyprlang): save and restore cpo setting in syntax script

1 view
Skip to first unread message

Christian Brabandt

unread,
Mar 26, 2025, 2:15:12 PM3/26/25
to vim...@googlegroups.com
runtime(hyprlang): save and restore cpo setting in syntax script

Commit: https://github.com/vim/vim/commit/f9f4e27ad76ee36a5a49013a84a466800d26f360
Author: Christian Brabandt <c...@256bit.org>
Date: Wed Mar 26 19:00:15 2025 +0100

runtime(hyprlang): save and restore cpo setting in syntax script

fixes: https://github.com/vim/vim/issues/16970
closes: https://github.com/vim/vim/issues/16973

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/hyprlang.vim b/runtime/syntax/hyprlang.vim
index cde504d9c..081d917b4 100644
--- a/runtime/syntax/hyprlang.vim
+++ b/runtime/syntax/hyprlang.vim
@@ -1,11 +1,14 @@
" Vim syntax file
" Language: hyprlang
" Maintainer: Luca Saccarola <github...@aleeas.com>
-" Last Change: 2025 Jan 29
+" Last Change: 2025 Mar 26

if exists("b:current_syntax")
finish
endif
+let s:cpo= &cpo
+set cpo&vim
+
let b:current_syntax = "hyprlang"

syn case ignore
@@ -56,4 +59,6 @@ hi def link hyprString String
hi def link hyprColor Structure
hi def link hyprCommand Keyword

+let &cpo = s:cpo
+unlet s:cpo
" vim: ts=8 sts=2 sw=2 et
Reply all
Reply to author
Forward
0 new messages