diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-11-14 10:01:29 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-11-14 10:01:29 +0000 |
commit | 518a687886456baeb397bdc751beb1ad682a3e6a (patch) | |
tree | 1a4952dcc110966800798961992f00b7553ac9d8 /spawn.c | |
parent | eb215d3d3fc6a55245cfbad77613129c06f6ff3c (diff) | |
parent | 2dbf062a891e992b438a0923b9ffd79638014872 (diff) |
Merge branch 'obsd-master'
Diffstat (limited to 'spawn.c')
-rw-r--r-- | spawn.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -215,6 +215,7 @@ spawn_pane(struct spawn_context *sc, char **cause) u_int hlimit; struct winsize ws; sigset_t set, oldset; + key_code key; spawn_log(__func__, sc); @@ -376,13 +377,17 @@ spawn_pane(struct spawn_context *sc, char **cause) /* * Update terminal escape characters from the session if available and - * force VERASE to tmux's \177. + * force VERASE to tmux's backspace. */ if (tcgetattr(STDIN_FILENO, &now) != 0) _exit(1); if (s->tio != NULL) memcpy(now.c_cc, s->tio->c_cc, sizeof now.c_cc); - now.c_cc[VERASE] = '\177'; + key = options_get_number(global_options, "backspace"); + if (key >= 0x7f) + now.c_cc[VERASE] = '\177'; + else + now.c_cc[VERASE] = key; if (tcsetattr(STDIN_FILENO, TCSANOW, &now) != 0) _exit(1); |