summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/cpp.vim
diff options
context:
space:
mode:
authorlaburnumT <laburnumtec@gmail.com>2023-12-08 21:27:03 +0100
committerChristian Brabandt <cb@256bit.org>2023-12-08 21:28:44 +0100
commitff0baca86523f1e8c6ea593ec0ef2f9860f001d0 (patch)
treef31a0e36913fe05fb6ddcac5041477a8f8b24428 /runtime/syntax/cpp.vim
parente06f2b498ccca921f34a1bec4464f042a5a2cabd (diff)
runtime(syntax): unlet b:filetype_in_cpp_family for cpp & squirrel
Update runtime/syntax/cpp.vim and runtime/syntax/squirrel.vim to unlet b:filetype_in_cpp_family as it remains set even after updating the ft of a file manually or through a modeline, not allowing c specific keywords to be highlighted. Since the variable b:filetype_in_cpp_family is only used by the c.vim syntax script, unlet it directly after sourcing the c.vim runtime file instead of at the end of the script. Also update the last Change Header for both files. closes: #13650 Signed-off-by: laburnumT <laburnumtec@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax/cpp.vim')
-rw-r--r--runtime/syntax/cpp.vim3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim
index 5437580a0a..8daf90a33c 100644
--- a/runtime/syntax/cpp.vim
+++ b/runtime/syntax/cpp.vim
@@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
-" Last Change: 2021 Aug 23
+" Last Change: 2023 Dec 08
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -15,6 +15,7 @@ let b:filetype_in_cpp_family = 1
" Read the C syntax to start with
runtime! syntax/c.vim
unlet b:current_syntax
+unlet b:filetype_in_cpp_family
" C++ extensions
syn keyword cppStatement new delete this friend using