summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-20 06:36:01 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-20 06:36:01 +0000
commit17fde823a88897e375735065a05fa1f8943df0bc (patch)
tree8fff3d30d056e15fda1cd38d196e1e267a941ded
parent89ea06e0a17dc5ceefc339a1571065e66523a9a1 (diff)
Freeze output when showing display line, fixes problems when no status line.
-rw-r--r--server-fn.c14
-rw-r--r--server.c8
-rw-r--r--tmux.h3
-rw-r--r--tty.c5
4 files changed, 20 insertions, 10 deletions
diff --git a/server-fn.c b/server-fn.c
index 4f0ef67a..c6b45fb1 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -1,4 +1,4 @@
-/* $Id: server-fn.c,v 1.47 2008-06-19 23:20:45 nicm Exp $ */
+/* $Id: server-fn.c,v 1.48 2008-06-20 06:36:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -38,7 +38,7 @@ server_set_client_message(struct client *c, const char *msg)
fatal("clock_gettime");
timespecadd(&c->message_timer, &ts, &c->message_timer);
- c->tty.flags |= TTY_NOCURSOR;
+ c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE);
c->flags |= CLIENT_STATUS;
}
@@ -51,8 +51,8 @@ server_clear_client_message(struct client *c)
xfree(c->message_string);
c->message_string = NULL;
- c->tty.flags &= ~TTY_NOCURSOR;
- c->flags |= CLIENT_STATUS;
+ c->tty.flags &= ~(TTY_NOCURSOR|TTY_FREEZE);
+ c->flags |= CLIENT_REDRAW;
}
void
@@ -67,7 +67,7 @@ server_set_client_prompt(
c->prompt_callback = fn;
c->prompt_data = data;
- c->tty.flags |= TTY_NOCURSOR;
+ c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE);
c->flags |= CLIENT_STATUS;
}
@@ -82,8 +82,8 @@ server_clear_client_prompt(struct client *c)
xfree(c->prompt_buffer);
- c->tty.flags &= ~TTY_NOCURSOR;
- c->flags |= CLIENT_STATUS;
+ c->tty.flags &= ~(TTY_NOCURSOR|TTY_FREEZE);
+ c->flags |= CLIENT_REDRAW;
}
void
diff --git a/server.c b/server.c
index 75727904..d7e218f8 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.72 2008-06-19 23:24:40 nicm Exp $ */
+/* $Id: server.c,v 1.73 2008-06-20 06:36:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -304,11 +304,15 @@ server_check_redraw(struct client *c)
struct screen screen;
u_int xx, yy, sx, sy;
char title[BUFSIZ];
+ int flags;
if (c == NULL || c->session == NULL)
return;
s = c->session;
+ flags = c->tty.flags & TTY_FREEZE;
+ c->tty.flags &= ~TTY_FREEZE;
+
if (options_get_number(&s->options, "set-titles")) {
xsnprintf(title, sizeof title,
"%s:%u:%s - \"%s\"", s->name, s->curw->idx,
@@ -363,6 +367,8 @@ server_check_redraw(struct client *c)
status_redraw(c);
}
+ c->tty.flags |= flags;
+
c->flags &= ~(CLIENT_REDRAW|CLIENT_STATUS);
}
diff --git a/tmux.h b/tmux.h
index 153e4295..242b63b2 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.155 2008-06-19 23:07:11 nicm Exp $ */
+/* $Id: tmux.h,v 1.156 2008-06-20 06:36:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -652,6 +652,7 @@ struct tty {
u_char acs[UCHAR_MAX + 1];
#define TTY_NOCURSOR 0x1
+#define TTY_FREEZE 0x2
int flags;
size_t ksize; /* maximum key size */
diff --git a/tty.c b/tty.c
index 503ea365..91f3361b 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.29 2008-06-19 23:07:11 nicm Exp $ */
+/* $Id: tty.c,v 1.30 2008-06-20 06:36:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -350,6 +350,9 @@ tty_vwrite(struct tty *tty, struct screen *s, int cmd, va_list ap)
char ch;
u_int i, ua, ub;
+ if (tty->flags & TTY_FREEZE)
+ return;
+
if (tty->term == NULL) /* XXX XXX */
return;
set_curterm(tty->term->term);