aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2014-09-22 20:56:45 -0700
committerGravatar Kevin Ballard <kevin@sb.org>2014-09-22 20:56:45 -0700
commit5eee7d17f610f58e4e797529f64751c18e237559 (patch)
treea25a6f588ea5e2483dc09af19f7e7517c5c230b0 /builtin.cpp
parent4718636ae2313393426ec0680acd3314a064a88d (diff)
Fix `bind -e` without `-k`
In adding `-k` support to `bind -e` I broke the ability to use `bind -e` without specifyign `-k`. Oops.
Diffstat (limited to 'builtin.cpp')
-rw-r--r--builtin.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/builtin.cpp b/builtin.cpp
index a66f90f1..190841fd 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -583,14 +583,21 @@ static int builtin_bind_erase(wchar_t **seq, int all, const wchar_t *mode, int u
while (*seq)
{
- wcstring seq2;
- if (get_terminfo_sequence(*seq++, &seq2))
+ if (use_terminfo)
{
- input_mapping_erase(seq2.c_str(), mode);
+ wcstring seq2;
+ if (get_terminfo_sequence(*seq++, &seq2))
+ {
+ input_mapping_erase(seq2.c_str(), mode);
+ }
+ else
+ {
+ res = 1;
+ }
}
else
{
- res = 1;
+ input_mapping_erase(*seq++, mode);
}
}