mirror of
https://github.com/tmux/tmux.git
synced 2025-04-19 02:38:47 +00:00
Freeze output when showing display line, fixes problems when no status line.
This commit is contained in:
parent
89ea06e0a1
commit
17fde823a8
14
server-fn.c
14
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>
|
* 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");
|
fatal("clock_gettime");
|
||||||
timespecadd(&c->message_timer, &ts, &c->message_timer);
|
timespecadd(&c->message_timer, &ts, &c->message_timer);
|
||||||
|
|
||||||
c->tty.flags |= TTY_NOCURSOR;
|
c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE);
|
||||||
c->flags |= CLIENT_STATUS;
|
c->flags |= CLIENT_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ server_clear_client_message(struct client *c)
|
|||||||
xfree(c->message_string);
|
xfree(c->message_string);
|
||||||
c->message_string = NULL;
|
c->message_string = NULL;
|
||||||
|
|
||||||
c->tty.flags &= ~TTY_NOCURSOR;
|
c->tty.flags &= ~(TTY_NOCURSOR|TTY_FREEZE);
|
||||||
c->flags |= CLIENT_STATUS;
|
c->flags |= CLIENT_REDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -67,7 +67,7 @@ server_set_client_prompt(
|
|||||||
c->prompt_callback = fn;
|
c->prompt_callback = fn;
|
||||||
c->prompt_data = data;
|
c->prompt_data = data;
|
||||||
|
|
||||||
c->tty.flags |= TTY_NOCURSOR;
|
c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE);
|
||||||
c->flags |= CLIENT_STATUS;
|
c->flags |= CLIENT_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ server_clear_client_prompt(struct client *c)
|
|||||||
|
|
||||||
xfree(c->prompt_buffer);
|
xfree(c->prompt_buffer);
|
||||||
|
|
||||||
c->tty.flags &= ~TTY_NOCURSOR;
|
c->tty.flags &= ~(TTY_NOCURSOR|TTY_FREEZE);
|
||||||
c->flags |= CLIENT_STATUS;
|
c->flags |= CLIENT_REDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
8
server.c
8
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>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -304,11 +304,15 @@ server_check_redraw(struct client *c)
|
|||||||
struct screen screen;
|
struct screen screen;
|
||||||
u_int xx, yy, sx, sy;
|
u_int xx, yy, sx, sy;
|
||||||
char title[BUFSIZ];
|
char title[BUFSIZ];
|
||||||
|
int flags;
|
||||||
|
|
||||||
if (c == NULL || c->session == NULL)
|
if (c == NULL || c->session == NULL)
|
||||||
return;
|
return;
|
||||||
s = c->session;
|
s = c->session;
|
||||||
|
|
||||||
|
flags = c->tty.flags & TTY_FREEZE;
|
||||||
|
c->tty.flags &= ~TTY_FREEZE;
|
||||||
|
|
||||||
if (options_get_number(&s->options, "set-titles")) {
|
if (options_get_number(&s->options, "set-titles")) {
|
||||||
xsnprintf(title, sizeof title,
|
xsnprintf(title, sizeof title,
|
||||||
"%s:%u:%s - \"%s\"", s->name, s->curw->idx,
|
"%s:%u:%s - \"%s\"", s->name, s->curw->idx,
|
||||||
@ -363,6 +367,8 @@ server_check_redraw(struct client *c)
|
|||||||
status_redraw(c);
|
status_redraw(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->tty.flags |= flags;
|
||||||
|
|
||||||
c->flags &= ~(CLIENT_REDRAW|CLIENT_STATUS);
|
c->flags &= ~(CLIENT_REDRAW|CLIENT_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
tmux.h
3
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>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -652,6 +652,7 @@ struct tty {
|
|||||||
u_char acs[UCHAR_MAX + 1];
|
u_char acs[UCHAR_MAX + 1];
|
||||||
|
|
||||||
#define TTY_NOCURSOR 0x1
|
#define TTY_NOCURSOR 0x1
|
||||||
|
#define TTY_FREEZE 0x2
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
size_t ksize; /* maximum key size */
|
size_t ksize; /* maximum key size */
|
||||||
|
5
tty.c
5
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>
|
* 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;
|
char ch;
|
||||||
u_int i, ua, ub;
|
u_int i, ua, ub;
|
||||||
|
|
||||||
|
if (tty->flags & TTY_FREEZE)
|
||||||
|
return;
|
||||||
|
|
||||||
if (tty->term == NULL) /* XXX XXX */
|
if (tty->term == NULL) /* XXX XXX */
|
||||||
return;
|
return;
|
||||||
set_curterm(tty->term->term);
|
set_curterm(tty->term->term);
|
||||||
|
Loading…
Reference in New Issue
Block a user