Compare commits
3 Commits
97a0cbb7bb
...
495a746c56
| Author | SHA1 | Date |
|---|---|---|
|
|
495a746c56 | |
|
|
2fc57d6306 | |
|
|
ccdd394e3f |
|
|
@ -86,7 +86,7 @@ grow ways to set `$PREBUFFER` to inject free-form code into the generated file.
|
|||
Highlighting test
|
||||
-----------------
|
||||
|
||||
[`test-highlighting.zsh`](tests/test-highlighting.zsh) tests the correctness of
|
||||
[`test-highlighting.zsh`](test-highlighting.zsh) tests the correctness of
|
||||
the highlighting. Usage:
|
||||
|
||||
```zsh
|
||||
|
|
@ -110,7 +110,7 @@ results (tests that failed but were expected to succeed, or vice-versa), run
|
|||
Performance test
|
||||
----------------
|
||||
|
||||
[`test-perfs.zsh`](tests/test-perfs.zsh) measures the time spent doing the
|
||||
[`test-perfs.zsh`](test-perfs.zsh) measures the time spent doing the
|
||||
highlighting. Usage:
|
||||
|
||||
```zsh
|
||||
|
|
|
|||
|
|
@ -165,6 +165,11 @@ _zsh_highlight()
|
|||
region_highlight[-1]=()
|
||||
}
|
||||
|
||||
# Do not highlight if there are pending inputs (copy/paste).
|
||||
# Placed before the region_highlight reset to preserve existing highlights.
|
||||
(( KEYS_QUEUED_COUNT > 0 )) && return $ret
|
||||
(( PENDING > 0 )) && return $ret
|
||||
|
||||
# Reset region_highlight to build it from scratch
|
||||
if (( zsh_highlight__memo_feature )); then
|
||||
region_highlight=( "${(@)region_highlight:#*memo=zsh-syntax-highlighting*}" )
|
||||
|
|
@ -210,10 +215,6 @@ _zsh_highlight()
|
|||
# likely a pasted command or a huge list of files in that case..
|
||||
[[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret
|
||||
|
||||
# Do not highlight if there are pending inputs (copy/paste).
|
||||
(( KEYS_QUEUED_COUNT > 0 )) && return $ret
|
||||
(( PENDING > 0 )) && return $ret
|
||||
|
||||
{
|
||||
local cache_place
|
||||
local -a region_highlight_copy
|
||||
|
|
|
|||
Loading…
Reference in New Issue