Fixes #540 #544 #552 #554 #555
Related to https://github.com/zsh-users/zsh-syntax-highlighting/issues/549#issuecomment-431628338 and to #556.