Zimfw: Syntax highlighting bug when auto completing command triggering my OCD

Created on 21 May 2018  路  7Comments  路  Source: zimfw/zimfw

% zmanage info                                                                                    ~
Zim commit ref:   3b7eeda
Zsh version:      zsh 5.5.1 (x86_64-apple-darwin17.5.0)
System info:      Darwin Mac.local 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64

Description

Syntax highlighting for known commands runs flawlessly, except when I auto complete with tab.
It's a minor bug, but I'm reporting it because I've been a long time zim user and this seems new.
It might be my fault somehow (:

Steps to reproduce

I literally formatted my Mac, installed zim and upon 5 minutes I realised it was off. Just auto complete any command.

Images or other information

zmanage turns white when pressing tab
zim-bug-report

All 7 comments

Oi @lsunsi.

syntax-highlighting should be the last item in your zmodules array. See this.

@ericbn It works, but it breaks history-substring-search.

@AtomicCoding @ericbn The funny thing is that I just installed this Mac and installed zim right away. I haven't customised anything but theme. This did not happen before. Could it be from a recent change?

@lsunsi, it could be changes to the upstream projects that broke something from the last time you used zim to now. I think we should update our zimrc template to reflect the current recommended order of loading these modules.

@AtomicCoding, you are right about history-substring-search. Moving it to after syntax-highlighting solved it for me. I'm using

zmodules=(archive autosuggestions directory environment git git-info history \
          input prompt ssh utility \
          completion syntax-highlighting history-substring-search)

Can you guys please try again having the last ones being completion syntax-highlighting history-substring-search? Also if you're using some other module that specifically depends on completion (like oh-my-zsh's osx) those should go after completion, of course.

EDIT: recording

@ericbn The issue randomly stopped for me. Even changing the orders back to the state earlier didn't reproduce the issue.

@ericbn (: I just moved highlighting and search to the end and it works perfectly. Many many thanks dude.

I went ahead and opened a pull request, in case this is really a bug that affects everyone. Of course we might need to dig around some more before merging it.

@AtomicCoding Heisenbug?

@Eriner @AtomicCoding @ericbn thanks for the attention y'all (:

Was this page helpful?
0 / 5 - 0 ratings