If you use invisible characters in your prompt you need to tell the shell by enclosing them in \[ and \]. If you don't then it will miscalculate the prompt width.
On Tue, Mar 19, 2013 at 09:31:06PM -0400, Yotam Barnoy wrote: > I hope this is the right place to report this. > On OSX, if I open a tmux pane and my .bashrc happens to assign a color to > the prompt using the ANSI escape sequences (e.g. #PS1="\e[0;34m\h:\W\$ > \e[m"), I get an odd problem. Whenever I get a line that fills up the > width of my pane, for example when paging through history, the terminal > misbehaves, usually by keeping a certain number of beginning characters > from that line on-screen. So for example if i had > > 'my-computer$ sudo port upgrade foo..' (pretend it's a full line) > > and then I paged through history using the up arrow, once I encountered > the above line in history I'd get > > 'my-computer$ sudo port upg rt install bar' > > on my terminal. The first characters of the wide line are stuck there and > won't go away. This makes correcting anything in history very difficult. > > Also, when I add to a line from history, the terminal won't scroll to the > next line once I fill up the line, but will scroll onto the same line. > > Removing the color escape sequences from the command prompt solves this > issue, but is obviously not the fix I want. > > Thanks > > Yotam Barnoy > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users