diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-30 19:57:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-03-30 19:57:02 +0000 |
commit | e2a7ac4b36a2b9e24648582cc17aaca5e1f7dedf (patch) | |
tree | 54d3cd3d351e36690907e74498e9c9d3ff6fae0a /window-copy.c | |
parent | 6fdac02b532a7e0d0e7fc307ef40981f033c2493 (diff) | |
download | rtmux-e2a7ac4b36a2b9e24648582cc17aaca5e1f7dedf.tar.gz rtmux-e2a7ac4b36a2b9e24648582cc17aaca5e1f7dedf.tar.bz2 rtmux-e2a7ac4b36a2b9e24648582cc17aaca5e1f7dedf.zip |
Fix UTF-8 in c&p mode.
Diffstat (limited to 'window-copy.c')
-rw-r--r-- | window-copy.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/window-copy.c b/window-copy.c index 4eb43604..8a4b183f 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1,4 +1,4 @@ -/* $Id: window-copy.c,v 1.53 2009-03-29 11:18:28 nicm Exp $ */ +/* $Id: window-copy.c,v 1.54 2009-03-30 19:57:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -481,6 +481,8 @@ window_copy_copy_line(struct window_pane *wp, if (sx < ex) { for (i = sx; i < ex; i++) { gc = grid_peek_cell(wp->base.grid, i, sy); + if (gc->flags & GRID_FLAG_PADDING) + continue; if (gc->flags & GRID_FLAG_UTF8) { *buf = xrealloc(*buf, 1, (*off) + 1); (*buf)[(*off)++] = gc->data; @@ -524,7 +526,9 @@ window_copy_find_length(struct window_pane *wp, u_int py) px = wp->base.grid->size[py]; while (px > 0) { gc = grid_peek_cell(wp->base.grid, px - 1, py); - if (!(gc->flags & GRID_FLAG_UTF8) && gc->data != ' ') + if (gc->flags & GRID_FLAG_UTF8) + break; + if (gc->data != ' ') break; px--; } |