Summary: | sys-libs/readline-6.3_p8-r2: Pressing delete key at end of line goes into command mode | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ta2002 <throw_away_2002> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
del.log created as requested
command output as requested |
Description
ta2002
2015-07-14 09:46:08 UTC
please post all relevant details in the bug. we don't want to deal with external links (even Gentoo sites). post the output of `locale` and the exact steps to reproduce the issue. For years (like about twenty of them) if I held down the "delete" key in the middle of a command, all of the characters to the right of the cursor would be removed one at a time until there were none left (and that was it). After the upgrade to readline 6.3, if I hold down the delete key, the characters still disappear one at a time, but after the last character under the cursor is removed, editing goes into "command mode," the prompt disappears, and is replaced with "(arg: 3) [remainder of command line]" The next press of the delete key restores the prompt, but each additional press now removes the character under the cursor, AND shifts the cursor one position to the left. After all of the characters are removed, the prompt is again replaced by "(arg: 3)" (followed by absolutely nothing). This happens even pressing the delete key with an empty command line (using bash). (In reply to throw_away_2002 from comment #2) i use the delete key all the time and have never run into a problem try building readline with sane CFLAGS to see if that makes the issue go away do you have an ~/.inputrc file (or have customized /etc/inputrc) ? if so, attach it here. what terminal are you using exactly ? what about your `locale` settings (as already requested) ? (In reply to SpanKY from comment #3) > try building readline with sane CFLAGS to see if that makes the issue go away Please tell me which CFLAG you believe is not sane. Those are the DEFAULT CFLAGS. $ gcc -march=native -Q -v -x c - < /dev/null [...] options passed: -v - -march=core2 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2 -fstack-protector [...] Actually, this was just suggested (even better): $ gcc -### -E - -march=native 2>&1 | sed -r '/cc1/!d;s/(")|(^.* - )|( -mno-[^\ ]+)//g' -march=core2 -mcx16 -msahf -msse4.1 -mfxsr --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=core2 -fstack-protector Guess I need to add -mfxsr to my CFLAGS (I like to see defaults explicitly declared). > do you have an ~/.inputrc file (or have customized /etc/inputrc) ? if so, > attach it here. No ~/.inputrc, and /etc/inputrc is the default with sys-apps/baselayout-2.2. There is a ""\e[3~": delete-char" line, but it looks like it is in a "$if mode=emacs" block, and I have "set -o vi" in ~/.bashrc. > what terminal are you using exactly ? what about your `locale` settings (as > already requested) ? Happens on all terminals from the console to konsole. Don't think there is anything interesting there (POSIX for sorting, end defaults for everything else), but since you asked: $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE=POSIX LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" Again, no problem in readline 6.2. Upgrading to 6.3 (no other changes) causes problem, downgrading fixes problem. (In reply to throw_away_2002 from comment #4) i'm not going to waste time debating compiler settings. verify something simple like the following still causes the bug to occur: CFLAGS='-O2 -pipe' if it still fails, try using typescript to post a session: $ script del.log $ export PS1='$ ' <do things to make the error happen, then exit the session> now upload the del.log file here as an attachment also what are your PS[1234] and PROMPT_COMMAND variables set to ? you're doing this all locally correct ? you aren't ssh-ing to a remote host ? you're not using screen/tmux/etc... right ? Created attachment 407270 [details]
del.log created as requested
(In reply to SpanKY from comment #5) > (In reply to throw_away_2002 from comment #4) > > i'm not going to waste time debating compiler settings. verify something > simple like the following still causes the bug to occur: > CFLAGS='-O2 -pipe' No problem. I just wanted to make the points that I am not using "insane" CFLAGS (they are the defaults), and omitting the defaults is not going to change compiler behavior at all. So I did exactly "CFLAGS='-O2 -pipe' emerge -1 readline" with no change in behavior. (In reply to SpanKY from comment #6) > if it still fails, try using typescript to post a session: > $ script del.log > $ export PS1='$ ' > <do things to make the error happen, then exit the session> > now upload the del.log file here as an attachment Should be attached (actually, I goofed that part up and created the attachment without the comment). I did three things: 1. changed PS1 as requested. 2. hit delete immediately (which replaced the prompt with "(arg: 3)"), and 3. (after hitting carriage returns to restore the prompt), typed the numbers from one to nine (plus zero), and then moved the cursor left five spaces, and then continuously pressed the delete key. The behavior was the numbers six through zero were deleted as expected, then with the next press, command mode was entered (the bad part) with the prompt again replaced by "(arg: 3)", then (at the next press, the prompt was restored, but I was still in command mode where each press of the delete key deleted the number under the cursor AND moved the cursor one space to the left. When all of the numbers were gone, it behaved like pressing the delete key with an empty line (which I just did above). > also what are your PS[1234] and PROMPT_COMMAND variables set to ? I changed PS1 to '$ ' for testing (no difference) , but they are normally: $ set | grep PS[1234] PS1='\[\033[0;31m\][\t]\[\033[0;32m\][\h:]\[\033[0;35m\][\#]\[\033[0;36m\][\w]$\[\033[0;00m\] ' PS2='> ' PS4='+ ' > you're doing this all locally correct ? you aren't ssh-ing to a remote host > ? > > you're not using screen/tmux/etc... right ? All local. No ssh, screen, or tmux. what does `stty -a` show ? how about `set` ? attach as logs as they'll be pretty spammy. Created attachment 416906 [details]
command output as requested
Sorry, this fell off my radar for a while, and I had to "fix" my main machine by reverting, and installing the problem version on a less important machine.
Acknowledged upstream (with a claim that a fix was committed) here: http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00007.html Won't see the fix until the next release, though. :( |