[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Cursor positioning in prompt is sometimes wrong, depending on locale and PS1
From: Jim Paris <jim () jtan ! com>
Date: 2009-06-17 19:47:40
Message-ID: 20090617194740.GA929 () psychosis ! jim ! sh
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic