[PATCH] Change <delete> to delete forward in the editor menu.

"Kevin J. McCarthy" <[email protected]> Fri, 24 Jul 2026 20:22:46 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
I saw this mentioned by tsp on #mutt.  Apparently <delete> is bound to
OP_EDITOR_BACKSPACE.  I never noticed because I just hit ctrl-d
instinctly instead of reaching over to the delete key!

<delete> has been set to delete backwards since the initial git
commit.  I believe this was related to the awkward era of 'stty erase'
setting 30 years ago to get del/backspace working properly.

I think we're past that, aren't we?  Change it to delete forward by
default.
---
 functions.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions.h b/functions.h
index 81705ddd..eab3df3d 100644
--- a/functions.h
+++ b/functions.h
@@ -843,7 +843,6 @@ const struct menu_func_op_t OpEditor[] = { /* map: editor */
 const struct menu_op_seq_t EditorDefaultBindings[] = { /* map: editor */
   { OP_EDITOR_BACKSPACE,       "\010" },
   { OP_EDITOR_BACKSPACE,       "<backspace>" },
-  { OP_EDITOR_BACKSPACE,       "<delete>" },
   { OP_EDITOR_BACKSPACE,       "\177" },
   { OP_EDITOR_BACKWARD_CHAR,   "\002" },
   { OP_EDITOR_BACKWARD_CHAR,   "<left>" },
@@ -855,6 +854,7 @@ const struct menu_op_seq_t EditorDefaultBindings[] = { /* map: editor */
   { OP_EDITOR_COMPLETE,        "\t"   },
   { OP_EDITOR_COMPLETE_QUERY,  "\024" },
   { OP_EDITOR_DELETE_CHAR,     "\004" },
+  { OP_EDITOR_DELETE_CHAR,     "<delete>" },
   { OP_EDITOR_DOWNCASE_WORD,   "\033l"},
   { OP_EDITOR_EOL,             "\005" },
   { OP_EDITOR_EOL,             "<end>" },
-- 
2.55.0