summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-04-24 17:35:39 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-04-24 17:35:39 +0200
commit4320f05168b47315383bd5439ff78202842cf37a (patch)
tree37fe9fc6fe40be9bca80b994fcc92688fb18d01c
parent0363099e539bf48a9a9ba68ce5005f3aaca6f8a1 (diff)
screen: improve aging for sb-reset
If the sb is already NULL, there's no need to increase the age of the screen. This avoids redrawing the terminal on each keystroke as terminals usually have to reset sbs then. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/tsm/tsm-screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tsm/tsm-screen.c b/src/tsm/tsm-screen.c
index 5c6161e..2004d9f 100644
--- a/src/tsm/tsm-screen.c
+++ b/src/tsm/tsm-screen.c
@@ -902,7 +902,7 @@ void tsm_screen_sb_page_down(struct tsm_screen *con, unsigned int num)
SHL_EXPORT
void tsm_screen_sb_reset(struct tsm_screen *con)
{
- if (!con)
+ if (!con || !con->sb_pos)
return;
screen_inc_age(con);