diff --git a/.version b/.version index c7d2522..9fb1210 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.7.2-dev +0.8.0-alpha2-dev diff --git a/changelog.md b/changelog.md index 7951f38..44ddbe0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # Changes in HEAD + +# Changes in 0.8.0-alpha1-pre-redrawhook + ## Notice about an improbable-but-not-impossible forward incompatibility Everyone can probably skip this section. @@ -131,6 +134,8 @@ to issue #418. revision zsh-5.8-172-gdd6e702ee or newer is also fine.) [#418, https://github.com/okapia/zsh-viexchange/issues/1] +- Improve performance of the `brackets` highlighter. + # Changes in version 0.7.1 diff --git a/highlighters/brackets/brackets-highlighter.zsh b/highlighters/brackets/brackets-highlighter.zsh index fc71f2a..bc388fd 100644 --- a/highlighters/brackets/brackets-highlighter.zsh +++ b/highlighters/brackets/brackets-highlighter.zsh @@ -51,8 +51,9 @@ _zsh_highlight_highlighter_brackets_paint() local -A levelpos lastoflevel matching # Find all brackets and remember which one is matching - for (( pos = 1; pos <= buflen; pos++ )) ; do - char=$BUFFER[pos] + pos=0 + for char in ${(s..)BUFFER} ; do + (( ++pos )) case $char in ["([{"]) levelpos[$pos]=$((++level))