Search code examples
cygwinzshrxvt

ZSH history-incremental-search-backward indents cursor


I've just started using ZSH with Cygwin/rxvt today (along with a default install of oh-my-zsh), and I'm noticing the reverse history search has a little quirk which is bothering me quite a bit. The search functionality works fine, but entering the search indents the cursor a bit:

jmullin-win7 >           {underlined}mkdir blah{/underlined}

This on it's own isn't really problematic, but if I execute the command, it will remain indented there. In addition, if I cancel out of the search, the cursor remains indented afterward:

jmullin-win7 > {blank}{cursor}

I can live with this if I must, but I wonder if anyone knows what could be causing this? Given the number of variables involved (Cygwin, rxvt, zsh, oh-my-zsh, etc.), and how new I am to zsh in general, I'm not sure where to start.


Solution

  • It looks very much like the issue here or here: you added colors to your prompt but forgot to tell zsh that these sequences have no width.