From fc26911b493eb151710e1a96578aad55596cfeb7 Mon Sep 17 00:00:00 2001 From: klutzy Date: Sun, 7 Apr 2013 14:21:00 +0900 Subject: [PATCH] vim: fix comment highlighting bug Previous commit had a bug that a line which ends with "//" or "/*" is not correctly highlighted. --- src/etc/vim/syntax/rust.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index 75858966c5577..303cc0834e8ef 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -113,8 +113,8 @@ syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8 syn region rustCommentDoc start="/\*\*" end="\*/" syn region rustCommentDoc start="///" skip="\\$" end="$" keepend syn match rustComment "/\*\*/" -syn region rustComment start="/\*[^\*]" end="\*/" contains=rustTodo -syn region rustComment start="//[^/]" skip="\\$" end="$" contains=rustTodo keepend +syn region rustComment start="/\*\([^\*]\|$\)" end="\*/" contains=rustTodo +syn region rustComment start="//\([^/]\|$\)" skip="\\$" end="$" contains=rustTodo keepend syn keyword rustTodo contained TODO FIXME XXX NB