Skip to content

Conversation

bbugyi200
Copy link

@bbugyi200 bbugyi200 commented Apr 3, 2022

The problem seems to be that when the POSTDISPLAY envvar is not set, $#POSTDISPLAY sometimes evaluates to 0POSTDISPLAY instead of 0.

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

@bashenk
Copy link

bashenk commented Apr 18, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tab results in 'bad math expression' error message

2 participants