Open bbugyi200 opened 2 years ago
I've noticed extremely similar behavior, at one time or another, myself. It might be a good idea to consider doing this for each reference of $#POSTDISPLAY
where it could theoretically be unset, since it does show up elsewhere (src/widgets.zsh
, src/highlight.zsh
, and the _zsh_autosuggest_accept
function in the same file). If no one gets around to it I can fork and submit a PR at a later date.
The problem seems to be that when the POSTDISPLAY envvar is not set,
$#POSTDISPLAY
sometimes evaluates to0POSTDISPLAY
instead of0
.Using curly braces (i.e.
${#POSTDISPLAY}
) to disambiguate should mitigate this issue. This should also be a low-risk change IMO, although I will admit that I have no idea why I am just now seeing this error message.Fixes #679