Bug 104885

Summary: delete key not working properly in prompts
Product: [Fedora] Fedora Reporter: Tomasz Ostrowski <tometzky+redhat>
Component: muttAssignee: Bill Nottingham <notting>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 3CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-27 17:13:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomasz Ostrowski 2003-09-23 09:11:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529

Description of problem:
Delete key is removing character before cursor instead of under it when in
prompt - it is working like backspace key.

Version-Release number of selected component (if applicable):
mutt-1.4.1-1

How reproducible:
Always

Steps to Reproduce:
1. Press 'm' to start new message
2. I "To:" prompt write "bu"
3. Press left arrow key so "b" is before cursor and "u" is under it
4. Press delete
    

Actual Results:  "b" deleted

Expected Results:  "u" deleted

Additional info:

I've testes this in both xterm (TERM=xterm) and console (TERM=linux).
I've tested this with locale set to "en_US".
This can be worked around by using Ctrl-D instead of Delete

Comment 1 Bill Nottingham 2005-01-26 22:34:43 UTC
Closing out bugs on older, unsupported, releases. Please reopen if
problem persists on current releases.

This is probably an issue with terminfo/terminal settings in general,
and not specific to mutt.

Comment 2 Tomasz Ostrowski 2005-01-27 13:23:18 UTC
Just tested on Fedora Core 3 - it still has this bug. I've also tested
some console aplications (line editing in bash, joe, less, links, vi)
and none had this bug - the character under the cursor is deleted - so
it doesn't look like a general terminfo/terminal issue.

Reopening and changing product to Fedora Core. I cannot change version
to 3 - i'll try later.

Comment 3 Bill Nottingham 2005-01-27 17:13:02 UTC
Aha, duh.

In mutt-<version>/keymap.c:
 
  km_bindkey ("<delete>", MENU_EDITOR, OP_EDITOR_BACKSPACE);

In fact, there is no operation in the line editor for delete,
so you can't even simply change the keybinding.

So, this is something that would have to be fixed upstream; you
could bring it up on mutt-dev. (The upstream mutt bugtracker
is down.)

Comment 4 Bill Nottingham 2005-01-27 17:20:28 UTC
Oops, I was wrong.

If you change that line to:

  km_bindkey ("<delete>", MENU_EDITOR, OP_EDITOR_DELETE_CHAR);

you'll get the behavior you want. But I really am disinclined to
change upstream behavior. I'll bring it up on the list.