Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZLE Vi-mode: visual mode selection doesn't match the characters highlighted



Doron Behar wrote:
> I'm glad Oliver that you are attending _this_ issue as well but I'd like
> to deal with it at that GitHub thread
> (https://github.com/zsh-users/zsh-syntax-highlighting/issues/637), as I
> don't feel it's related and focus here on the _cursor's_ character's
> highlighting.

Pull request #638 there addresses that issue. I was able to reproduce
that problem once I tried with a double-quoted (and hence highlighted)
string. I had missed that detail before. Would be good if you could give
that some testing - I don't use the plugin.

Seems ugly that they have to reproduce the builtin highlighting. The
region_highlight feature could do with a way to layer entries and to
tell which belong to which plugin.

> > We could perhaps use some hooks for when visual mode is invoked and
> > finished.
>
> Yea I can use `zle-keymap-select` in the meantime...

Except that doesn't trigger for local keymaps like visual.

> > Whatever highlighting is chosen, there will be some terminal
> > setup for which it is not ideal and somebody who complains.
>
> I hope I've demonstrated good enough that this is not a terminal
> emulator issue, it's an issue of a non blinking cursor. Hence, I think
> my complain is legitimate.

Yes, I agree that it is legitimate. But I don't see what you'd change in
the code other than the default colours. The effect as I understand it
is just as I originally described: the cursor reversing the highlighting
to give you back the defaults. I think vim's defaults amount to
zle_highlight=( region:bg=white,fg=black )

Oliver



Messages sorted by: Reverse Date, Date, Thread, Author