dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 708e968859cc59ce6da612afdb865d920887a8f8
parent 5ea14eda2d15431293370995c2ef364711e94f8e
Author: Joshua Schneider <joshuas@student.ethz.ch>
Date:   Wed, 17 Apr 2013 14:50:12 +0200

cmdline: Add Delete Character (DC) handling

Diffstat:
vt.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/vt.c b/vt.c @@ -1873,6 +1873,14 @@ static void cmdline_keypress(Cmdline *c, int keycode) ssize_t len; size_t n = (c->end - c->cursor) * sizeof(wchar_t); switch (keycode) { + case KEY_DC: + if (c->cursor == c->end) /* n == 0 */ + break; + memmove(c->cursor, c->cursor + 1, n - sizeof(wchar_t)); + c->end--; + *c->end = L'\0'; + cmdline_adjust_cursor_pos(c); + break; case KEY_BACKSPACE: if (c->cursor == c->buf) break;