views:

43

answers:

3

When I'm typing a command longer than around 20 characters the text disappears and the cursor moves to a different location in the terminal. How do I stop this? I find it difficult to understand what I'm doing when this happens.

A: 

Does not happen here so I suspect something in your setup probably of zsh.

Have you tried moving all your ~/.zsh* files and start with a blank environment?

Mark
A: 

There could be an incorrect TERM type, resulting in incorrect cursor positioning. For OS X Terminal.app, this term type works well for most curses-based apps:

$ echo $TERM
xterm-color

It should also work well in xterm.

Ned Deily
+2  A: 

Your $PROMPT may have escape sequences in it that should be wrapped in %{...%} to keep them from being counted when zsh calculates the length of the displayed prompt.

Dennis Williamson
Thanks, I had a missing end %}. Adding this looks to have solved the problem.
Michael Barton