Sync OpenBSD patchset 227:

Add a flags member to the grid_line struct and use it to differentiate lines
wrapped at the screen edge from those terminated by a newline. Then use this
when copying to combine wrapped lines together into one.
This commit is contained in:
Tiago Cunha
2009-08-09 17:32:06 +00:00
parent 37b0bcd7c1
commit 97eb537f38
4 changed files with 51 additions and 25 deletions

9
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.406 2009-08-09 17:28:23 tcunha Exp $ */
/* $Id: tmux.h,v 1.407 2009-08-09 17:32:06 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -483,6 +483,9 @@ struct mode_key_table {
#define GRID_FLAG_PADDING 0x4
#define GRID_FLAG_UTF8 0x8
/* Grid line flags. */
#define GRID_LINE_WRAPPED 0x1
/* Grid cell data. */
struct grid_cell {
u_char attr;
@ -506,6 +509,8 @@ struct grid_line {
u_int utf8size;
struct grid_utf8 *utf8data;
int flags;
} __packed;
/* Entire grid of cells. */
@ -1503,7 +1508,7 @@ void screen_write_reverseindex(struct screen_write_ctx *);
void screen_write_scrollregion(struct screen_write_ctx *, u_int, u_int);
void screen_write_insertmode(struct screen_write_ctx *, int);
void screen_write_mousemode(struct screen_write_ctx *, int);
void screen_write_linefeed(struct screen_write_ctx *);
void screen_write_linefeed(struct screen_write_ctx *, int);
void screen_write_carriagereturn(struct screen_write_ctx *);
void screen_write_kcursormode(struct screen_write_ctx *, int);
void screen_write_kkeypadmode(struct screen_write_ctx *, int);