Minor Terminal tweaks to make it more usable
Bash history is broken still, there is no CTRL+backspace, but it's alright ig.
This commit is contained in:
parent
a14cca9a99
commit
8bed0e9d52
@ -756,7 +756,6 @@ static int master_cb(int fd, void *data) {
|
||||
} else if (buf[i] == '\b') {
|
||||
if (cursor_x > 0) {
|
||||
cursor_x--;
|
||||
terminal_buffer[cursor_y][cursor_x] = ' ';
|
||||
needs_refresh = 1;
|
||||
} else if (cursor_y > 0) {
|
||||
cursor_y--;
|
||||
@ -851,10 +850,8 @@ static void key_press_cb(XKeyEvent *event, void *data) {
|
||||
needs_refresh = 1;
|
||||
} else if (keysym == XK_Up) { // Go up through history
|
||||
write(*master, "\033[A", 3);
|
||||
needs_refresh = 1;
|
||||
} else if (keysym == XK_Down) { // Go down through history
|
||||
write(*master, "\033[B", 3);
|
||||
needs_refresh = 1;
|
||||
} else if (keysym == XK_Tab) {
|
||||
write(*master, "\t", 1); // Shell handles autocomplete
|
||||
} else if (len > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user