mirror of
https://github.com/tmux/tmux.git
synced 2025-04-12 03:58:47 +00:00
Fix UTF-8 in c&p mode.
This commit is contained in:
parent
6fdac02b53
commit
e2a7ac4b36
1
TODO
1
TODO
@ -87,7 +87,6 @@
|
||||
(hopefully) for 0.8, in no particular order:
|
||||
- swap-pane-up, swap-pane-down (maybe move-pane-*)
|
||||
- test bug sshing from freebsd console
|
||||
- c&p is funny w/ UTF-8: skips over width=2
|
||||
|
||||
- document repeat behaviour and -r on bind-key
|
||||
- document status-keys
|
||||
|
@ -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--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user