From 417642eb8ea8397fdb62723d28e3c4222b7e5098 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 26 May 2013 00:01:47 -0700 Subject: [PATCH] Implement insert mode. --- protocols/ssh/src/terminal_handlers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protocols/ssh/src/terminal_handlers.c b/protocols/ssh/src/terminal_handlers.c index 002f7981..47bfa87c 100644 --- a/protocols/ssh/src/terminal_handlers.c +++ b/protocols/ssh/src/terminal_handlers.c @@ -203,6 +203,11 @@ int guac_terminal_echo(guac_terminal* term, char c) { } + /* If insert mode, shift other characters right by 1 */ + if (term->insert_mode) + guac_terminal_copy_columns(term, term->cursor_row, + term->cursor_col, term->term_width-2, 1); + /* Write character */ guac_terminal_set(term, term->cursor_row,