diff options
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | screen.c | 4 | ||||
-rw-r--r-- | server-fn.c | 4 | ||||
-rw-r--r-- | tmux.h | 3 | ||||
-rw-r--r-- | window-more.c | 7 | ||||
-rw-r--r-- | window-scroll.c | 6 |
6 files changed, 15 insertions, 12 deletions
@@ -70,7 +70,8 @@ - stuff like rename would be nice to be able to do in-client like screen, if it could be implemented in a non-icky way - there is to much redrawing. use flags? -- use modes for help etc +- command mode (! + type tmux command) +- copy mode -- For 0.2 -------------------------------------------------------------------- - copy and paste @@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.35 2007-11-21 22:20:44 nicm Exp $ */ +/* $Id: screen.c,v 1.36 2007-11-22 09:11:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -297,7 +297,7 @@ screen_draw_stop(struct screen_draw_ctx *ctx) if (ctx->attr != s->attr || ctx->colr != s->colr) input_store_two(b, CODE_ATTRIBUTES, s->attr, s->colr); - if (!(s->mode & MODE_BACKGROUND) && s->mode & MODE_CURSOR) + if (!(s->mode & MODE_NOCURSOR) && s->mode & MODE_CURSOR) input_store_zero(b, CODE_CURSORON); } diff --git a/server-fn.c b/server-fn.c index 245b3b65..27a43a41 100644 --- a/server-fn.c +++ b/server-fn.c @@ -1,4 +1,4 @@ -/* $Id: server-fn.c,v 1.29 2007-11-21 20:04:37 nicm Exp $ */ +/* $Id: server-fn.c,v 1.30 2007-11-22 09:11:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -175,7 +175,7 @@ server_clear_client(struct client *c) input_store_zero(c->out, CODE_CLEARLINE); } input_store_two(c->out, CODE_CURSORMOVE, s->cy + 1, s->cx + 1); - if (!(s->mode & MODE_BACKGROUND) && s->mode & MODE_CURSOR) + if (!(s->mode & MODE_NOCURSOR) && s->mode & MODE_CURSOR) input_store_zero(c->out, CODE_CURSORON); size = BUFFER_USED(c->out) - size; @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.92 2007-11-21 22:20:44 nicm Exp $ */ +/* $Id: tmux.h,v 1.93 2007-11-22 09:11:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -341,6 +341,7 @@ struct msg_resize_data { #define MODE_SAVED 0x10 #define MODE_HIDDEN 0x20 #define MODE_BACKGROUND 0x40 +#define MODE_NOCURSOR 0x80 /* * Virtual screen. This is stored as three blocks of 8-bit values, one for diff --git a/window-more.c b/window-more.c index 00ace798..7e848143 100644 --- a/window-more.c +++ b/window-more.c @@ -1,4 +1,4 @@ -/* $Id: window-more.c,v 1.2 2007-11-21 19:53:56 nicm Exp $ */ +/* $Id: window-more.c,v 1.3 2007-11-22 09:11:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -74,7 +74,7 @@ window_more_init(struct window *w) ARRAY_INIT(&data->list); data->top = 0; - w->screen.mode |= MODE_BACKGROUND; + w->screen.mode |= (MODE_BACKGROUND|MODE_NOCURSOR); } void @@ -91,6 +91,7 @@ window_more_draw_position(struct window *w, struct screen_draw_ctx *ctx) char *line; size_t n; + len = xsnprintf( buf, sizeof buf, "[%u/%u]", data->top, ARRAY_LENGTH(&data->list)); if (len <= screen_size_x(ctx->s)) @@ -185,7 +186,7 @@ window_more_key(struct window *w, int key) w->mode = NULL; xfree(w->modedata); - w->screen.mode &= ~MODE_BACKGROUND; + w->screen.mode &= ~(MODE_BACKGROUND|MODE_NOCURSOR); recalculate_sizes(); server_redraw_window_all(w); diff --git a/window-scroll.c b/window-scroll.c index 0efd3fe0..0c9ef2ec 100644 --- a/window-scroll.c +++ b/window-scroll.c @@ -1,4 +1,4 @@ -/* $Id: window-scroll.c,v 1.10 2007-11-21 21:28:58 nicm Exp $ */ +/* $Id: window-scroll.c,v 1.11 2007-11-22 09:11:20 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -56,7 +56,7 @@ window_scroll_init(struct window *w) data->ox = data->oy = 0; data->size = w->screen.hsize; - w->screen.mode |= MODE_BACKGROUND; + w->screen.mode |= (MODE_BACKGROUND|MODE_NOCURSOR); } void @@ -130,7 +130,7 @@ window_scroll_key(struct window *w, int key) w->mode = NULL; xfree(w->modedata); - w->screen.mode &= ~MODE_BACKGROUND; + w->screen.mode &= ~(MODE_BACKGROUND|MODE_NOCURSOR); recalculate_sizes(); server_redraw_window_all(w); |