Commit: runtime(pov): nested pov comments break highlighting

Christian Brabandt <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <[email protected]>
runtime(pov): nested pov comments break highlighting

Commit: https://github.com/vim/vim/commit/ee1517df53bc34f22f501c56ec6773df1fc0c484
Author: Shay Hill <[email protected]>
Date:   Wed Aug 19 22:03:04 2026 +0000

    runtime(pov): nested pov comments break highlighting
    
    A line comment nested in a block comment (the comment plugin uses a
    block comment on every line) break syntax highlighting and shade the
    rest of the file as a comment.
    
    closes: #21109
    
    Signed-off-by: Shay Hill <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/pov.vim b/runtime/syntax/pov.vim
index 87b2aa580..5d1be9adf 100644
--- a/runtime/syntax/pov.vim
+++ b/runtime/syntax/pov.vim
@@ -3,6 +3,7 @@
 " Maintainer: David Necas (Yeti) <[email protected]>
 " Last Change: 2011-04-23
 " 2025 Apr 21 by Vim Project (deprecate render and statistics #17177)
+" 2026 Aug 20 by Vim Project (allow nesting of different comments #21109)
 
 " Setup
 " quit when a syntax file was already loaded
@@ -70,10 +71,10 @@ syn match povConsts "\<[tuvxyz]\>"
 syn match povDotItem "\.\@<=\(blue\|green\|gray\|filter\|red\|transmit\|hf\|t\|u\|v\|x\|y\|z\)\>" display
 
 " Comments
-syn region povComment start="/\*" end="\*/" contains=povTodo,povComment
-syn match povComment "//.*" contains=povTodo
+syn region povBlockComment start="/\*" end="\*/" contains=povTodo,povBlockComment
+syn match povLineComment "//.*" contains=povTodo
 syn match povCommentError "\*/"
-syn sync ccomment povComment
+syn sync ccomment povBlockComment
 syn sync minlines=50
 syn keyword povTodo TODO FIXME XXX NOT contained
 syn cluster povPRIVATE add=povTodo
@@ -105,7 +106,8 @@ syn match povBraceError "}"
 syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="
 
 " Define the default highlighting
-hi def link povComment Comment
+hi def link povBlockComment Comment
+hi def link povLineComment Comment
 hi def link povTodo Todo
 hi def link povNumber Number
 hi def link povString String

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wx6p7-00DrG8-74%40256bit.org.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.