#!/usr/bin/env zsh local -i cursor=CURSOR local postdisplay=$POSTDISPLAY local buffer=$BUFFER BUFFER=$1 POSTDISPLAY=.. if [[ -n $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE ]]; then local style=$ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE elif (( terminfo[colors] >= 256 )); then local style='fg=244' else local style='fg=black,bold' fi region_highlight+=("$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $style") typeset -gi CURSOR='_z4h_cursor_max()' -z4h-cursor-hide zle -R BUFFER=$buffer CURSOR=cursor POSTDISPLAY=$postdisplay region_highlight[-1]=()