mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 20:58:53 +00:00
- Ignore padding when writing so copying the screen for copy-mode doesn't include extra characters.
- Handle combined characters properly when the previous character is not UTF-8.
This commit is contained in:
parent
ae0ba11ac2
commit
4cbf7d489e
2
TODO
2
TODO
@ -87,7 +87,7 @@
|
|||||||
(hopefully) for 0.8, in no particular order:
|
(hopefully) for 0.8, in no particular order:
|
||||||
- swap-pane-up, swap-pane-down (maybe move-pane-*)
|
- swap-pane-up, swap-pane-down (maybe move-pane-*)
|
||||||
- test bug sshing from freebsd console
|
- test bug sshing from freebsd console
|
||||||
- c&p is funny w/ UTF-8: a) skips over width=2 b) displays padding cells
|
- c&p is funny w/ UTF-8: skips over width=2
|
||||||
- fix compare fn for UTF-8
|
- fix compare fn for UTF-8
|
||||||
|
|
||||||
- document repeat behaviour and -r on bind-key
|
- document repeat behaviour and -r on bind-key
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: screen-write.c,v 1.40 2009-03-28 20:17:29 nicm Exp $ */
|
/* $Id: screen-write.c,v 1.41 2009-03-29 11:06:22 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -533,6 +533,10 @@ screen_write_cell(
|
|||||||
struct grid_cell tmp_gc, *tmp_gc2;
|
struct grid_cell tmp_gc, *tmp_gc2;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
|
/* Ignore padding. */
|
||||||
|
if (gc->flags & GRID_FLAG_PADDING)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Find character width. */
|
/* Find character width. */
|
||||||
if (gc->flags & GRID_FLAG_UTF8) {
|
if (gc->flags & GRID_FLAG_UTF8) {
|
||||||
uvalue = utf8_combine(udata);
|
uvalue = utf8_combine(udata);
|
||||||
@ -547,9 +551,14 @@ screen_write_cell(
|
|||||||
if (width == 0) {
|
if (width == 0) {
|
||||||
if (s->cx == 0)
|
if (s->cx == 0)
|
||||||
return;
|
return;
|
||||||
gc = grid_view_peek_cell(gd, s->cx - 1, s->cy);
|
tmp_gc2 = grid_view_get_cell(gd, s->cx - 1, s->cy);
|
||||||
if (!(gc->flags & GRID_FLAG_UTF8))
|
if (!(tmp_gc2->flags & GRID_FLAG_UTF8)) {
|
||||||
return;
|
tmp_gc2->flags |= GRID_FLAG_UTF8;
|
||||||
|
memset(&gu.data, 0xff, sizeof gu.data);
|
||||||
|
*gu.data = tmp_gc2->data;
|
||||||
|
gu.width = 1;
|
||||||
|
grid_view_set_utf8(gd, s->cx - 1, s->cy, &gu);
|
||||||
|
}
|
||||||
tmp_gu = grid_view_get_utf8(gd, s->cx - 1, s->cy);
|
tmp_gu = grid_view_get_utf8(gd, s->cx - 1, s->cy);
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user