mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-01-30 09:47:13 +08:00
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
This commit is contained in:
commit
637e1c702e
@ -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
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user