[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cursor positioning in prompt is sometimes wrong, depending on locale
From: |
Jim Paris |
Subject: |
Re: Cursor positioning in prompt is sometimes wrong, depending on locale and PS1 |
Date: |
Wed, 17 Jun 2009 15:47:40 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Chet Ramey wrote:
> Jim Paris wrote:
> > The cursor positioning in the prompt is sometimes wrong,
> > depending on the contents of PS1 and the locale.
> >
> > Repeat-By:
> >
> > With this command, the cursor is positioned after the '5', as expected:
> >
> > env -i LC_CTYPE=en_US PS1='\[\e[0m\]12345' INPUTRC=/dev/null bash --norc
> > --noprofile
> >
> >
> > With this command, the cursor is incorrectly positioned after the
> > '1':
> >
> > env -i LC_CTYPE=en_US.UTF-8 PS1='\[\e[0m\]12345' INPUTRC=/dev/null bash
> > --norc --noprofile
>
> It's not really the locale per se, but the horizontal scroll mode that
> needs attention. (I didn't really think anybody used it anymore, but
> you forced it when you started bash without TERM defined.) Try the
> attached patch.
Yes, it fixes this, thanks.
The real problem I'm trying to track down is that the cursor is
sometimes put in the wrong position after a reverse-isearch. This was
what I came up with when trying to reproduce in a simple test case.
I'll run with the new patch and see if that helps my other problem
too (which can be a bit tricky to reproduce).
-jim