From 514fe11727c1b2744fff28c525fb4f48ca944860 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 11 Feb 2009 17:04:39 +0000 Subject: We are going to need the updated screen data for emulating the scroll region, which may involve changing the cursor position; however, the old (before redraw) cursor position is necessary for writing to the tty. So, save it before doing the redraw then update the internal screen then update the tty. Not sure I like this solution but it does the job for now. --- tmux.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 19980417..6a5a259c 100644 --- a/tmux.h +++ b/tmux.h @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.266 2009-02-11 07:02:34 nicm Exp $ */ +/* $Id: tmux.h,v 1.267 2009-02-11 17:04:39 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -496,9 +496,15 @@ struct screen { u_int cx; /* cursor x */ u_int cy; /* cursor y */ + u_int old_cx; + u_int old_cy; + u_int rupper; /* scroll region top */ u_int rlower; /* scroll region bottom */ + u_int old_rupper; + u_int old_rlower; + int mode; struct screen_sel sel; @@ -1011,9 +1017,10 @@ void options_set_number(struct options *, const char *, long long); long long options_get_number(struct options *, const char *); /* tty.c */ +void tty_reset(struct tty *); +void tty_region(struct tty *, u_int, u_int, u_int); void tty_cursor(struct tty *, u_int, u_int, u_int); -void tty_cell(struct tty *, - struct screen *, u_int, const struct grid_cell *); +void tty_cell(struct tty *, const struct grid_cell *); void tty_putcode(struct tty *, enum tty_code_code); void tty_putcode1(struct tty *, enum tty_code_code, int); void tty_putcode2(struct tty *, enum tty_code_code, int, int); -- cgit