bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: backward-kill-word is not refreshing correctly


From: Jay Freeman (saurik)
Subject: Re: backward-kill-word is not refreshing correctly
Date: Sat, 11 Apr 2009 11:40:09 -0700

And help I will definitely attempt. Here are the requested values:

col_lendiff = 5
_rl_last_c_pos = 194
_rl_screenwidth = 126

Some random other variables, in case they end up being requested:

lendiff = 5
old = 8403456
new = 8457216
ne = 8457410
oe = 8403655
temp = 0

My cursor is definitely not past the end of my screen. This seems to be a bug in the way prompts are handled. I have a ludicrously complex prompt that has a large number of non-printing characters. This issue then only occurs (as one would expect) if the math works out so the total number of characters in the prompt (/including non-printing ones/) plus my true cursor offset from the prompt is past the edge of the screen, but isn't /actually/.

And yes, I am definitely being very careful about using \[ and \] to bound my non-printable characters. I even got it down to this very trivial test case, where ... indicates "more numbers to fill space here", so I could easily see "yes, the \[ and \] are placed correctly". ;P

PS1=$'0123456789...0123456789\\[\e[0m\\]'

However, even given this knowledge, the bug remains unreproducable on my amd64 box. I have, however, found someone using FreeBSD who said he was seeing related-sounding issues with Bash 4.x, and I know he's also using colored prompts. I am also now confident this is the same problem Matt was having, as once he had killed enough words to get out of the danger region (his prompt was probably not as ludicrous as mine), it started working again.

Also, while looking into this (in the hope of reproducing it on Linux), I noticed that in builtins/Makefile.in, LDFLAGS_FOR_BUILD uses LDFLAGS which uses CFLAGS... which is the CFLAGS for the target, not for the build. This became a problem as I tried to do a 32-bit build of bash (using CFLAGS='-O2 -m32 -g') and mkbuiltins.o was compiled without -m32 (as it uses CCFLAGS_FOR_BUILD, which bypasses CFLAGS to use BASE_CCFLAGS) but was being linked with -m32. I do not yet have a correct fix for this unrelated issue.

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
http://www.saurik.com/

----- Original Message ----- From: "Chet Ramey" <chet.ramey@case.edu>
To: "Jay Freeman (saurik)" <saurik@saurik.com>
Cc: <bug-bash@gnu.org>; <matt@ice.filescope.com>; <chet.ramey@case.edu>
Sent: Saturday, April 11, 2009 9:14 AM
Subject: Re: backward-kill-word is not refreshing correctly
...
I can't reproduce the problem, and it seems to only appear in builds
for your iphone.  I'm going to need help with it. :-)

Please check the values of _rl_last_c_pos and _rl_screenwidth when this
code is executed and the problem occurs.  It's likely that the former is
set incorrectly somewhere, but I can't tell that for sure yet.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]