mirror of
https://github.com/tmux/tmux.git
synced 2026-04-16 03:56:28 +00:00
Merge branch 'obsd-master'
This commit is contained in:
10
grid.c
10
grid.c
@@ -200,7 +200,7 @@ grid_adjust_lines(struct grid *gd, u_int lines)
|
|||||||
|
|
||||||
/* Copy default into a cell. */
|
/* Copy default into a cell. */
|
||||||
static void
|
static void
|
||||||
grid_clear_cell(struct grid *gd, u_int px, u_int py, u_int bg)
|
grid_clear_cell(struct grid *gd, u_int px, u_int py, u_int bg, int moved)
|
||||||
{
|
{
|
||||||
struct grid_line *gl = &gd->linedata[py];
|
struct grid_line *gl = &gd->linedata[py];
|
||||||
struct grid_cell_entry *gce = &gl->celldata[px];
|
struct grid_cell_entry *gce = &gl->celldata[px];
|
||||||
@@ -209,7 +209,7 @@ grid_clear_cell(struct grid *gd, u_int px, u_int py, u_int bg)
|
|||||||
int had_extd = (gce->flags & GRID_FLAG_EXTENDED);
|
int had_extd = (gce->flags & GRID_FLAG_EXTENDED);
|
||||||
|
|
||||||
memcpy(gce, &grid_cleared_entry, sizeof *gce);
|
memcpy(gce, &grid_cleared_entry, sizeof *gce);
|
||||||
if (had_extd && old_offset < gl->extdsize) {
|
if (!moved && had_extd && old_offset < gl->extdsize) {
|
||||||
gce->flags |= GRID_FLAG_EXTENDED;
|
gce->flags |= GRID_FLAG_EXTENDED;
|
||||||
gce->offset = old_offset;
|
gce->offset = old_offset;
|
||||||
gee = grid_extended_cell(gl, gce, &grid_cleared_cell);
|
gee = grid_extended_cell(gl, gce, &grid_cleared_cell);
|
||||||
@@ -515,7 +515,7 @@ grid_expand_line(struct grid *gd, u_int py, u_int sx, u_int bg)
|
|||||||
(sx - gl->cellsize) * sizeof *gl->celldata);
|
(sx - gl->cellsize) * sizeof *gl->celldata);
|
||||||
}
|
}
|
||||||
for (xx = gl->cellsize; xx < sx; xx++)
|
for (xx = gl->cellsize; xx < sx; xx++)
|
||||||
grid_clear_cell(gd, xx, py, bg);
|
grid_clear_cell(gd, xx, py, bg, 0);
|
||||||
gl->cellsize = sx;
|
gl->cellsize = sx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -683,7 +683,7 @@ grid_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny, u_int bg)
|
|||||||
|
|
||||||
grid_expand_line(gd, yy, px + ox, 8); /* default bg first */
|
grid_expand_line(gd, yy, px + ox, 8); /* default bg first */
|
||||||
for (xx = px; xx < px + ox; xx++)
|
for (xx = px; xx < px + ox; xx++)
|
||||||
grid_clear_cell(gd, xx, yy, bg);
|
grid_clear_cell(gd, xx, yy, bg, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,7 +777,7 @@ grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx,
|
|||||||
for (xx = px; xx < px + nx; xx++) {
|
for (xx = px; xx < px + nx; xx++) {
|
||||||
if (xx >= dx && xx < dx + nx)
|
if (xx >= dx && xx < dx + nx)
|
||||||
continue;
|
continue;
|
||||||
grid_clear_cell(gd, xx, py, bg);
|
grid_clear_cell(gd, xx, py, bg, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
screen.c
5
screen.c
@@ -786,8 +786,9 @@ screen_mode_to_string(int mode)
|
|||||||
return (tmp);
|
return (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Convert screen to a string. */
|
||||||
const char *
|
const char *
|
||||||
screen_print(struct screen *s)
|
screen_print(struct screen *s, int line)
|
||||||
{
|
{
|
||||||
static char *buf;
|
static char *buf;
|
||||||
static size_t len = 16384;
|
static size_t len = 16384;
|
||||||
@@ -803,6 +804,8 @@ screen_print(struct screen *s)
|
|||||||
buf = xmalloc(len);
|
buf = xmalloc(len);
|
||||||
|
|
||||||
for (y = 0; y < screen_hsize(s) + s->grid->sy; y++) {
|
for (y = 0; y < screen_hsize(s) + s->grid->sy; y++) {
|
||||||
|
if (line >= 0 && y != (u_int)line)
|
||||||
|
continue;
|
||||||
n = snprintf(buf + last, len - last, "%.4d \"", y);
|
n = snprintf(buf + last, len - last, "%.4d \"", y);
|
||||||
if (n <= 0 || (u_int)n >= len - last)
|
if (n <= 0 || (u_int)n >= len - last)
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
2
tmux.h
2
tmux.h
@@ -3345,7 +3345,7 @@ int screen_select_cell(struct screen *, struct grid_cell *,
|
|||||||
void screen_alternate_on(struct screen *, struct grid_cell *, int);
|
void screen_alternate_on(struct screen *, struct grid_cell *, int);
|
||||||
void screen_alternate_off(struct screen *, struct grid_cell *, int);
|
void screen_alternate_off(struct screen *, struct grid_cell *, int);
|
||||||
const char *screen_mode_to_string(int);
|
const char *screen_mode_to_string(int);
|
||||||
const char *screen_print(struct screen *);
|
const char *screen_print(struct screen *, int);
|
||||||
|
|
||||||
/* window.c */
|
/* window.c */
|
||||||
extern struct windows windows;
|
extern struct windows windows;
|
||||||
|
|||||||
@@ -474,23 +474,46 @@ tty_default_features(int *feat, const char *name, u_int version)
|
|||||||
#define TTY_FEATURES_BASE_MODERN_XTERM \
|
#define TTY_FEATURES_BASE_MODERN_XTERM \
|
||||||
"256,RGB,bpaste,clipboard,mouse,strikethrough,title"
|
"256,RGB,bpaste,clipboard,mouse,strikethrough,title"
|
||||||
{ .name = "mintty",
|
{ .name = "mintty",
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
|
||||||
",ccolour,cstyle,extkeys,margins,overline,usstyle"
|
"ccolour,"
|
||||||
|
"cstyle,"
|
||||||
|
"extkeys,"
|
||||||
|
"margins,"
|
||||||
|
"overline,"
|
||||||
|
"usstyle"
|
||||||
},
|
},
|
||||||
{ .name = "tmux",
|
{ .name = "tmux",
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
|
||||||
",ccolour,cstyle,focus,overline,usstyle,hyperlinks"
|
"ccolour,"
|
||||||
|
"cstyle,"
|
||||||
|
"extkeys,"
|
||||||
|
"focus,"
|
||||||
|
"overline,"
|
||||||
|
"usstyle,"
|
||||||
|
"hyperlinks"
|
||||||
},
|
},
|
||||||
{ .name = "rxvt-unicode",
|
{ .name = "rxvt-unicode",
|
||||||
.features = "256,bpaste,ccolour,cstyle,mouse,title,ignorefkeys"
|
.features = "256,"
|
||||||
|
"bpaste,"
|
||||||
|
"ccolour,"
|
||||||
|
"cstyle,"
|
||||||
|
"mouse,"
|
||||||
|
"title,"
|
||||||
|
"ignorefkeys"
|
||||||
},
|
},
|
||||||
{ .name = "iTerm2",
|
{ .name = "iTerm2",
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
|
||||||
",cstyle,extkeys,margins,usstyle,sync,osc7,hyperlinks"
|
"cstyle,"
|
||||||
|
"extkeys,"
|
||||||
|
"margins,"
|
||||||
|
"usstyle,"
|
||||||
|
"sync,"
|
||||||
|
"osc7,hyperlinks"
|
||||||
},
|
},
|
||||||
{ .name = "foot",
|
{ .name = "foot",
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
|
||||||
",cstyle,extkeys"
|
"cstyle,"
|
||||||
|
"extkeys"
|
||||||
},
|
},
|
||||||
{ .name = "XTerm",
|
{ .name = "XTerm",
|
||||||
/*
|
/*
|
||||||
@@ -498,8 +521,11 @@ tty_default_features(int *feat, const char *name, u_int version)
|
|||||||
* disabled so not set it here - they will be added if
|
* disabled so not set it here - they will be added if
|
||||||
* secondary DA shows VT420.
|
* secondary DA shows VT420.
|
||||||
*/
|
*/
|
||||||
.features = TTY_FEATURES_BASE_MODERN_XTERM
|
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
|
||||||
",ccolour,cstyle,extkeys,focus"
|
"ccolour,"
|
||||||
|
"cstyle,"
|
||||||
|
"extkeys,"
|
||||||
|
"focus"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
u_int i;
|
u_int i;
|
||||||
|
|||||||
Reference in New Issue
Block a user