diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-27 19:32:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-27 19:32:15 +0000 |
commit | 80e30f693c925841b5874063ca1d8aab2c42d231 (patch) | |
tree | 5890bde38ebe3e4e2ff96cbb658151efc700164a | |
parent | 76c8a590db14131928f79123adcab934a3825501 (diff) |
Minor tweaks/missed bits.
-rw-r--r-- | screen.c | 10 | ||||
-rw-r--r-- | tmux.h | 3 | ||||
-rw-r--r-- | tty.c | 3 | ||||
-rw-r--r-- | window-copy.c | 3 | ||||
-rw-r--r-- | window-scroll.c | 4 |
5 files changed, 18 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.50 2007-11-27 19:23:34 nicm Exp $ */ +/* $Id: screen.c,v 1.51 2007-11-27 19:32:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -323,6 +323,14 @@ screen_draw_start(struct screen_draw_ctx *ctx, struct screen *s, ctx->write(ctx->data, TTY_CURSOROFF); } +/* Set offset. */ +void +screen_draw_set_offset(struct screen_draw_ctx *ctx, u_int ox, u_int oy) +{ + ctx->ox = ox; + ctx->oy = oy; +} + /* Set selection. */ void screen_draw_set_selection(struct screen_draw_ctx *ctx, @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.101 2007-11-27 19:23:34 nicm Exp $ */ +/* $Id: tmux.h,v 1.102 2007-11-27 19:32:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -833,6 +833,7 @@ void screen_draw_start_session( void screen_draw_start(struct screen_draw_ctx *, struct screen *s, void (*)(void *, int, ...), void *, u_int, u_int); void screen_draw_stop(struct screen_draw_ctx *); +void screen_draw_set_offset(struct screen_draw_ctx *, u_int, u_int); void screen_draw_set_selection( struct screen_draw_ctx *, int, u_int, u_int, u_int, u_int); int screen_draw_check_selection(struct screen_draw_ctx *, u_int, u_int); @@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.1 2007-11-27 19:23:34 nicm Exp $ */ +/* $Id: tty.c,v 1.2 2007-11-27 19:32:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -74,6 +74,7 @@ tty_open(struct tty *tty, char **cause) break; default: xasprintf(cause, "unknown error"); + break; } return (-1); } diff --git a/window-copy.c b/window-copy.c index 1840914c..eb5c5d37 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1,4 +1,4 @@ -/* $Id: window-copy.c,v 1.10 2007-11-27 19:23:34 nicm Exp $ */ +/* $Id: window-copy.c,v 1.11 2007-11-27 19:32:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -120,6 +120,7 @@ window_copy_draw( data->oy += s->hsize - data->size; data->size = s->hsize; } + screen_draw_set_offset(ctx, data->ox, data->oy); if (py != 0) screen_draw_lines(ctx, py, ny); diff --git a/window-scroll.c b/window-scroll.c index 07d0663b..d696dabe 100644 --- a/window-scroll.c +++ b/window-scroll.c @@ -1,4 +1,4 @@ -/* $Id: window-scroll.c,v 1.13 2007-11-27 19:23:34 nicm Exp $ */ +/* $Id: window-scroll.c,v 1.14 2007-11-27 19:32:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -86,6 +86,7 @@ window_scroll_draw_position(struct window *w, struct screen_draw_ctx *ctx) screen_draw_move_cursor(ctx, screen_size_x(ctx->s) - len, 0); screen_draw_set_attributes(ctx, 0, status_colour); + screen_draw_write_string(ctx, "%s", ptr); } void @@ -99,6 +100,7 @@ window_scroll_draw( data->oy += s->hsize - data->size; data->size = s->hsize; } + screen_draw_set_offset(ctx, data->ox, data->oy); if (py != 0) screen_draw_lines(ctx, py, ny); |