mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-06-05 12:36:28 +08:00
allow running zsh with set -u (no unset var)
I have been using this for a while. It makes me feel safer by turning on set -u by default, which abort on unset var This line seems to be the only one tripping set -u so this is a very simple change.
This commit is contained in:
parent
0e810e5afa
commit
2d9bd96ae2
@ -255,7 +255,7 @@ _zsh_autosuggest_highlight_reset() {
|
|||||||
_zsh_autosuggest_highlight_apply() {
|
_zsh_autosuggest_highlight_apply() {
|
||||||
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||||
|
|
||||||
if (( $#POSTDISPLAY )); then
|
if (( ${#POSTDISPLAY-} )); then
|
||||||
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
||||||
region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
|
region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user