diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-22 18:09:43 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-22 18:09:43 +0000 |
commit | 18d72e69289fa3dbdb0766ea7f9c0ff8908626b9 (patch) | |
tree | db3fca1dba3a1041c902764f32b2fcdf2cd915c2 /window-scroll.c | |
parent | 4930e894c278a9267861ccf3db231d97d2208741 (diff) | |
download | rtmux-18d72e69289fa3dbdb0766ea7f9c0ff8908626b9.tar.gz rtmux-18d72e69289fa3dbdb0766ea7f9c0ff8908626b9.tar.bz2 rtmux-18d72e69289fa3dbdb0766ea7f9c0ff8908626b9.zip |
Partial copy mode. Currently does the same as scroll mode but using a cursor. Also fix bug where resizing would leave crap lying around.
Diffstat (limited to 'window-scroll.c')
-rw-r--r-- | window-scroll.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/window-scroll.c b/window-scroll.c index 0c9ef2ec..f36bba5e 100644 --- a/window-scroll.c +++ b/window-scroll.c @@ -1,4 +1,4 @@ -/* $Id: window-scroll.c,v 1.11 2007-11-22 09:11:20 nicm Exp $ */ +/* $Id: window-scroll.c,v 1.12 2007-11-22 18:09:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -56,7 +56,8 @@ window_scroll_init(struct window *w) data->ox = data->oy = 0; data->size = w->screen.hsize; - w->screen.mode |= (MODE_BACKGROUND|MODE_NOCURSOR); + w->screen.mode |= MODE_BACKGROUND; + w->screen.mode &= ~MODE_BGCURSOR; } void @@ -72,7 +73,7 @@ window_scroll_draw_position(struct window *w, struct screen_draw_ctx *ctx) size_t len; len = xsnprintf( - buf, sizeof buf, "[%u,%u/%u]", data->ox, data->oy, ctx->s->hsize); + buf, sizeof buf, "[%u,%u/%u]", data->ox, data->oy, data->size); if (len <= screen_size_x(ctx->s)) ptr = buf; else { @@ -109,7 +110,6 @@ window_scroll_draw(struct window *w, struct buffer *b, u_int py, u_int ny) window_scroll_draw_position(w, &ctx); screen_draw_stop(&ctx); - input_store_zero(b, CODE_CURSOROFF); } void @@ -130,7 +130,7 @@ window_scroll_key(struct window *w, int key) w->mode = NULL; xfree(w->modedata); - w->screen.mode &= ~(MODE_BACKGROUND|MODE_NOCURSOR); + w->screen.mode &= ~MODE_BACKGROUND; recalculate_sizes(); server_redraw_window_all(w); @@ -286,7 +286,6 @@ window_scroll_right_1(struct window *w) screen_draw_column(&ctx, screen_last_x(s)); window_scroll_draw_position(w, &ctx); screen_draw_stop(&ctx); - input_store_zero(c->out, CODE_CURSOROFF); size = BUFFER_USED(c->out) - size; hdr.type = MSG_DATA; @@ -329,7 +328,6 @@ window_scroll_left_1(struct window *w) screen_draw_column(&ctx, 0); window_scroll_draw_position(w, &ctx); screen_draw_stop(&ctx); - input_store_zero(c->out, CODE_CURSOROFF); size = BUFFER_USED(c->out) - size; hdr.type = MSG_DATA; |