Closed michaelorr closed 1 year ago
I do not use IntelliJ and I would love if someone could validate behavior inside the IntelliJ terminal. I have seen reliably that IntelliJ should be setting this environment variable and I can validate that setting this environment variable reintroduces the bug for non-IntelliJ terminals and removing the environment variable fixes the bug for non-IntelliJ terminals
Hey @jeffreytse , no real urgency but I'm just curious what would be necessary to help move this forward?
Hi @michaelorr
Thanks for your contribution to this project, I will try to do a quick review as soon as possible. : )
Thanks & Regards
IntelliJ terminal requires
zle redisplay
to be called but this breaks completion menus in non IntelliJ terminals.This uses an environment variable to detect whether we are in an IntelliJ terminal and only calls
zle redisplay
for those environments. See also: https://youtrack.jetbrains.com/issue/IDEA-191464/Add-environment-variable-to-terminal-detect-if-running-in-IntelliJ-IDESPreviously the code tried to guard against this bug by looking at
$LASTWIDGET
but unfortunately we cannot reliably assume that the completion widget hascomplet
in the name (on my personal setup, I sawautosuggest-suggest
andself-insert
as the$LASTWIDGET
during completions depending on context and other zsh plugins enabled).See also: https://github.com/jeffreytse/zsh-vi-mode/issues/122