From bff886841b91ceb394b7f515a90be0ed13b1dfdc Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Mon, 21 Sep 2020 21:15:15 +0200 Subject: Always accept ^? as well as ^H as backspace --- LICENSE | 2 +- sdn.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index e3b945d..3bfb256 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017 - 2018, Přemysl Eric Janouch +Copyright (c) 2017 - 2020, Přemysl Eric Janouch Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. diff --git a/sdn.cpp b/sdn.cpp index 2de9f4e..f97f0ca 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -1,7 +1,7 @@ // // sdn: simple directory navigator // -// Copyright (c) 2017 - 2018, Přemysl Eric Janouch +// Copyright (c) 2017 - 2020, Přemysl Eric Janouch // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted. @@ -427,6 +427,8 @@ static map g_normal_actions { static map g_input_actions { {27, ACTION_INPUT_ABORT}, {CTRL 'g', ACTION_INPUT_ABORT}, {L'\r', ACTION_INPUT_CONFIRM}, {KEY (ENTER), ACTION_INPUT_CONFIRM}, + // Sometimes terminfo is wrong, we need to accept both of these + {L'\b', ACTION_INPUT_B_DELETE}, {L'\177', ACTION_INPUT_B_DELETE}, {KEY (BACKSPACE), ACTION_INPUT_B_DELETE}, }; static const map*> g_binding_contexts { -- cgit v1.2.3-70-g09d2