diff options
| author | 2013-01-18 02:16:21 +0000 | |
|---|---|---|
| committer | 2013-01-18 02:16:21 +0000 | |
| commit | e031297f8653bb0880a0d222a7a28043dce07ca4 (patch) | |
| tree | 303d5b1a1404253fdde6d5979cf9fab6b00e3179 /usr.bin/tmux/grid-view.c | |
| parent | Style nits - return (x) not return x. (diff) | |
| download | wireguard-openbsd-e031297f8653bb0880a0d222a7a28043dce07ca4.tar.xz wireguard-openbsd-e031297f8653bb0880a0d222a7a28043dce07ca4.zip | |
Rather than having two grids for each pane, one for ASCII and one for
UTF-8, collapse the two together. Simplifies the code at the expense of
more memory (which can probably be reduced again later).
Diffstat (limited to 'usr.bin/tmux/grid-view.c')
| -rw-r--r-- | usr.bin/tmux/grid-view.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/usr.bin/tmux/grid-view.c b/usr.bin/tmux/grid-view.c index b9edffe81c7..2ae64831ad6 100644 --- a/usr.bin/tmux/grid-view.c +++ b/usr.bin/tmux/grid-view.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid-view.c,v 1.10 2012/01/29 21:31:11 nicm Exp $ */ +/* $OpenBSD: grid-view.c,v 1.11 2013/01/18 02:16:21 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -52,28 +52,6 @@ grid_view_set_cell( grid_set_cell(gd, grid_view_x(gd, px), grid_view_y(gd, py), gc); } -/* Get UTF-8 for reading. */ -const struct grid_utf8 * -grid_view_peek_utf8(struct grid *gd, u_int px, u_int py) -{ - return (grid_peek_utf8(gd, grid_view_x(gd, px), grid_view_y(gd, py))); -} - -/* Get UTF-8 for writing. */ -struct grid_utf8 * -grid_view_get_utf8(struct grid *gd, u_int px, u_int py) -{ - return (grid_get_utf8(gd, grid_view_x(gd, px), grid_view_y(gd, py))); -} - -/* Set UTF-8. */ -void -grid_view_set_utf8( - struct grid *gd, u_int px, u_int py, const struct grid_utf8 *gu) -{ - grid_set_utf8(gd, grid_view_x(gd, px), grid_view_y(gd, py), gu); -} - /* Clear into history. */ void grid_view_clear_history(struct grid *gd) @@ -87,7 +65,7 @@ grid_view_clear_history(struct grid *gd) last = 0; for (yy = 0; yy < gd->sy; yy++) { gl = &gd->linedata[grid_view_y(gd, yy)]; - if (gl->cellsize != 0 || gl->utf8size != 0) + if (gl->cellsize != 0) last = yy + 1; } if (last == 0) |
