Skip to content

Commit e477f10

Browse files
committed
Fix off-screen regexp quirk [Morita Sho]
Prior to this fix, the following erroneously highlights the second line as a regexp when the first line is off screen: func /\(/ puts
1 parent f9c78fc commit e477f10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/ruby.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!
6464
syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline
6565
syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display
6666
syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained
67-
syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained display
67+
syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained
6868
syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display
6969
syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
7070
syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display

0 commit comments

Comments
 (0)