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 HEAD
|
||||||
|
|
||||||
|
|
||||||
|
# Changes in 0.8.0-alpha1-pre-redrawhook
|
||||||
|
|
||||||
## Notice about an improbable-but-not-impossible forward incompatibility
|
## Notice about an improbable-but-not-impossible forward incompatibility
|
||||||
|
|
||||||
Everyone can probably skip this section.
|
Everyone can probably skip this section.
|
||||||
@ -131,6 +134,8 @@ to issue #418.
|
|||||||
revision zsh-5.8-172-gdd6e702ee or newer is also fine.)
|
revision zsh-5.8-172-gdd6e702ee or newer is also fine.)
|
||||||
[#418, https://github.com/okapia/zsh-viexchange/issues/1]
|
[#418, https://github.com/okapia/zsh-viexchange/issues/1]
|
||||||
|
|
||||||
|
- Improve performance of the `brackets` highlighter.
|
||||||
|
|
||||||
|
|
||||||
# Changes in version 0.7.1
|
# Changes in version 0.7.1
|
||||||
|
|
||||||
|
@ -51,8 +51,9 @@ _zsh_highlight_highlighter_brackets_paint()
|
|||||||
local -A levelpos lastoflevel matching
|
local -A levelpos lastoflevel matching
|
||||||
|
|
||||||
# Find all brackets and remember which one is matching
|
# Find all brackets and remember which one is matching
|
||||||
for (( pos = 1; pos <= buflen; pos++ )) ; do
|
pos=0
|
||||||
char=$BUFFER[pos]
|
for char in ${(s..)BUFFER} ; do
|
||||||
|
(( ++pos ))
|
||||||
case $char in
|
case $char in
|
||||||
["([{"])
|
["([{"])
|
||||||
levelpos[$pos]=$((++level))
|
levelpos[$pos]=$((++level))
|
||||||
|
Loading…
Reference in New Issue
Block a user