Skip to content

Commit 637e1c7

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/redrawhook
* origin/master: Post-release version number bump. Tag version 0.8.0-alpha1-pre-redrawhook. brackets: Optimize the character iteration
2 parents cb33cc0 + 2d60a47 commit 637e1c7

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.2-dev
1+
0.8.0-alpha2-dev

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changes in HEAD
22

3+
4+
# Changes in 0.8.0-alpha1-pre-redrawhook
5+
36
## Notice about an improbable-but-not-impossible forward incompatibility
47

58
Everyone can probably skip this section.
@@ -131,6 +134,8 @@ to issue #418.
131134
revision zsh-5.8-172-gdd6e702ee or newer is also fine.)
132135
[#418, https://github.com/okapia/zsh-viexchange/issues/1]
133136

137+
- Improve performance of the `brackets` highlighter.
138+
134139

135140
# Changes in version 0.7.1
136141

highlighters/brackets/brackets-highlighter.zsh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ _zsh_highlight_highlighter_brackets_paint()
5151
local -A levelpos lastoflevel matching
5252

5353
# Find all brackets and remember which one is matching
54-
for (( pos = 1; pos <= buflen; pos++ )) ; do
55-
char=$BUFFER[pos]
54+
pos=0
55+
for char in ${(s..)BUFFER} ; do
56+
(( ++pos ))
5657
case $char in
5758
["([{"])
5859
levelpos[$pos]=$((++level))

0 commit comments

Comments
 (0)