From 745bceb9d857c25d5e7b1448881e1529a7f58b9b Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Fri, 16 Dec 2016 21:52:58 -0800 Subject: [PATCH] fix backspace/del vi mode bindings The recent refactoring to separate default (emacs) from vi key bindings overlooked adding `\cH` bindings to vi mode. This also fixes the behavior of the [del] key bindings (\x7F). Fixes #3653 --- share/functions/fish_vi_key_bindings.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index aac703f37..a99276060 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -118,8 +118,10 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' # Backspace deletes a char in insert mode, but not in normal/default mode. bind -M insert -k backspace backward-delete-char bind -M default -k backspace backward-char - bind -M insert \x7f backward-delete-char - bind -M default \x7f backward-char + bind -M insert \ch backward-delete-char + bind -M default \ch backward-char + bind -M insert \x7f delete-char + bind -M default \x7f delete-char bind \e\[3\;2~ backward-delete-char # Mavericks Terminal.app shift-delete bind dd kill-whole-line