wlt: terminal: reset scrollback-position on user-input
authorDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 1 Oct 2012 14:42:08 +0000 (16:42 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Mon, 1 Oct 2012 14:42:08 +0000 (16:42 +0200)
On user-input we now reset the scrollback-position so it is set to the
actualy screen again. This is normal behavior of most other terminals and
I see no reason not to do this.

If anybody requests it, we can make it easily optional via a command-line
setting.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/wlt_terminal.c

index 07c6d47..31f792e 100644 (file)
@@ -342,8 +342,10 @@ static void widget_key(struct wlt_widget *widget, unsigned int mask,
                return;
        }
 
-       if (tsm_vte_handle_keyboard(term->vte, sym, mask, ucs4))
+       if (tsm_vte_handle_keyboard(term->vte, sym, mask, ucs4)) {
+               tsm_screen_sb_reset(term->scr);
                wlt_window_schedule_redraw(term->wnd);
+       }
 }
 
 static void vte_event(struct tsm_vte *vte, const char *u8, size_t len,