summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/c.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-24 19:47:27 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-24 19:47:27 +0000
commitf9393ef5efde2f425fbd9e19363186f8c9103376 (patch)
treeec493a8fec62c31f9fe21993c4907bf1c1f290cd /runtime/syntax/c.vim
parent4a85b4156098a30daf5b15a7fb7587a1c7c99f94 (diff)
updated for version 7.0fv7.0f
Diffstat (limited to 'runtime/syntax/c.vim')
-rw-r--r--runtime/syntax/c.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 5339ea6f69..3b0536aa3b 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Apr 12
+" Last Change: 2006 Apr 24
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -260,7 +260,11 @@ endif
syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>"
if !exists("c_no_if0")
- syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2
+ if !exists("c_no_if0_fold")
+ syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 fold
+ else
+ syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2
+ endif
syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
endif