7197223 vim shows high CPU usage when editing dtrace script with syntax highlighting enabled s11u1-sru
authorVladimir Marek <Vladimir.Marek@oracle.com>
Tue, 18 Sep 2012 14:19:10 +0200
branchs11u1-sru
changeset 2383 3862772c06ca
parent 2382 849399608850
child 2384 213142545a23
7197223 vim shows high CPU usage when editing dtrace script with syntax highlighting enabled
components/vim/patches/7197223.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/vim/patches/7197223.patch	Tue Sep 18 14:19:10 2012 +0200
@@ -0,0 +1,13 @@
+--- runtime/syntax/dtrace.vim	Thu Sep 13 09:27:02 2012
++++ runtime/syntax/dtrace.vim	Thu Sep 13 09:27:15 2012
+@@ -40,8 +40,8 @@
+ " XXX: This allows a probe description to end with ',', even if it's not
+ " followed by another probe.
+ " XXX: This doesn't work if followed by a comment.
+-let s:oneProbe = '\%(BEGIN\|END\|ERROR\|\S\{-}:\S\{-}:\S\{-}:\S\{-}\)\_s*'
+-exec 'syn match dtraceProbe "'.s:oneProbe.'\%(,\_s*'.s:oneProbe.'\)*\ze\_s\%({\|\/[^*]\|\%$\)"'
++let s:oneProbe = '\%(BEGIN\|END\|ERROR\|\S\{-}:\S\{-}:\S\{-}:\S*\)\_s*'
++exec 'syn match dtraceProbe "'.s:oneProbe.'\%(,\_s*'.s:oneProbe.'\)*\ze\_s*\%({\|\/[^*]\|\_s*\S\|\%$\)"'
+ 
+ " Note: We have to be careful to not make this match /* */ comments.
+ " Also be careful not to eat `c = a / b; b = a / 2;`. We use the same