zsh-syntax-highlighting icon indicating copy to clipboard operation
zsh-syntax-highlighting copied to clipboard

How to enable redraw without using feature-redrawhook branch?

Open jason5122 opened this issue 4 years ago • 6 comments

Hi, when I type a command and use tab to get completions, sometimes the syntax highlighting disappears. I switched to the feature-redrawhook branch which seems to work, but it gives me a warning that the branch will not receive any more updates. I see that it has been merged to master, but I can't seem to get it to work with that branch. Is there a setting I need to enable or something?

I am on macOS 11, zsh 5.8.

jason5122 avatar Dec 04 '20 21:12 jason5122

Please bisect. (git pull origin master; git bisect start; git bisect old origin/feature/redrawhook; git bisect new origin/master.)'

danielshahaf avatar Dec 05 '20 11:12 danielshahaf

First broken commit is https://github.com/zsh-users/zsh-syntax-highlighting/commit/3944a44ffe447b64d4bc55a1ff66154363bb0dd6

damiandimanov avatar Nov 29 '21 10:11 damiandimanov

That commit causes the pre-redrawhook, "bind all widgets" codepath to be used.

Try changing if is-at-least to if true on line 417 of HEAD of master. See the comments above that line for caveats (5.8 doesn't have the memo= feature).

danielshahaf avatar Dec 01 '21 03:12 danielshahaf

Changing if is-at-least to if true works on latest master. Dropping the commit seems to also "fix" the issue.

damiandimanov avatar Dec 01 '21 16:12 damiandimanov

Changing if is-at-least to if true works on latest master.

Okay, so the bug y'all are seeing shouldn't happen under zsh 5.9, when that's released and y'all upgrade to it.

Dropping the commit seems to also "fix" the issue.

Well, yes, by causing the "bind all widgets" codepath to be taken.

Is there anything else that we need to do on our end, here?

danielshahaf avatar Dec 01 '21 20:12 danielshahaf

Well, yes, by causing the "bind all widgets" codepath to be taken.

Correction: dropping that commit causes that codepath not to be taken.

danielshahaf avatar Dec 01 '21 20:12 danielshahaf