Merge branch 'master' into command_parser

This commit is contained in:
Nicholas Marriott
2026-07-01 00:13:28 +01:00
9 changed files with 79 additions and 31 deletions

10
CHANGES
View File

@@ -1,3 +1,12 @@
CHANGES FROM 3.7 to 3.7a
* Fix crash in break-pane when no name is provided.
* Scrollbar options are now cached rather than being looked up for every redraw
(issue 5298).
* Only forbid #( in names, allow #[, empty names, : and .
CHANGES FROM 3.6b TO 3.7
* Add floating panes. These are panes which sit above the layout ("tiled
@@ -5,6 +14,7 @@ CHANGES FROM 3.6b TO 3.7
the same escape sequence support). Floating panes are created with the
new-pane command, bound to * by default.
This is an early release of this feature and they are relatively limited.
Currently floating panes can only be moved and resized using the mouse. The
default second status line (if status-format is set to 2) has changed to show
a list of panes. Many obvious features are not yet available for floating

48
grid.c
View File

@@ -74,11 +74,45 @@ grid_check_lines(struct grid *gd)
}
}
}
void
grid_check_is_clear(struct grid *gd)
{
struct grid_line *gl;
u_int yy, ny;
assert(gd != NULL);
if (gd->sy == 0) {
assert(gd->linedata == NULL);
return;
}
assert(gd->linedata != NULL);
ny = gd->hsize + gd->sy;
for (yy = 0; yy < ny; yy++) {
gl = &gd->linedata[yy];
assert(gl->celldata == NULL);
assert(gl->cellused == 0);
assert(gl->cellsize == 0);
assert(gl->extddata == NULL);
assert(gl->extdsize == 0);
assert(gl->flags == 0);
assert(gl->time == 0);
}
}
#else
static void
grid_check_lines(__unused struct grid *gd)
{
}
void
grid_check_is_clear(__unused struct grid *gd)
{
}
#endif
/* Store cell in entry. */
@@ -341,28 +375,18 @@ grid_create(u_int sx, u_int sy, u_int hlimit)
{
struct grid *gd;
gd = xmalloc(sizeof *gd);
gd = xcalloc(1, sizeof *gd);
gd->sx = sx;
gd->sy = sy;
if (hlimit != 0)
gd->flags = GRID_HISTORY;
else
gd->flags = 0;
gd->hscrolled = 0;
gd->hsize = 0;
gd->hlimit = hlimit;
gd->scroll_added = 0;
gd->scroll_collected = 0;
gd->scroll_generation = 0;
if (gd->sy != 0)
gd->linedata = xcalloc(gd->sy, sizeof *gd->linedata);
else
gd->linedata = NULL;
grid_check_is_clear(gd);
return (gd);
}

View File

@@ -206,8 +206,6 @@ static const char* mode_tree_help_start[] = {
"#[fg=themelightgrey]"
" C-s #[#{E:tree-mode-border-style},acs]x#[default] Search forward",
"#[fg=themelightgrey]"
" C-r #[#{E:tree-mode-border-style},acs]x#[default] Search backward",
"#[fg=themelightgrey]"
" n #[#{E:tree-mode-border-style},acs]x#[default] Repeat search forward",
"#[fg=themelightgrey]"
" N #[#{E:tree-mode-border-style},acs]x#[default] Repeat search backward",

View File

@@ -1011,6 +1011,8 @@ screen_write_stop_sync(struct window_pane *wp)
evtimer_del(&wp->sync_timer);
wp->base.mode &= ~MODE_SYNC;
wp->flags |= PANE_REDRAW;
log_debug("%s: %%%u stopped sync mode", __func__, wp->id);
}

View File

@@ -123,7 +123,7 @@ screen_reinit(struct screen *s)
s->saved_cy = UINT_MAX;
screen_reset_tabs(s);
grid_check_is_clear(s->grid);
grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy, 8);
screen_clear_selection(s);

View File

@@ -2053,8 +2053,7 @@ server_client_reset_state(struct client *c)
if (sb_w > wp->sx)
sb_w = wp->sx;
if (sb_w != 0 &&
w->sb_pos ==
PANE_SCROLLBARS_LEFT) {
w->sb_pos == PANE_SCROLLBARS_LEFT) {
if (s->cx < sb_w)
cursor = 0;
} else if (sb_w != 0 &&

1
tmux.h
View File

@@ -3274,6 +3274,7 @@ bitstr_t *fuzzy_match(const char *, const char *, u_int, u_int *);
/* grid.c */
extern const struct grid_cell grid_default_cell;
void grid_check_is_clear(struct grid *);
void grid_empty_line(struct grid *, u_int, u_int);
void grid_set_tab(struct grid_cell *, u_int);
int grid_cells_equal(const struct grid_cell *, const struct grid_cell *);

View File

@@ -583,6 +583,18 @@ tty_default_features(int *feat, const char *name, u_int version)
"hyperlinks,"
"usstyle"
},
{ .name = "ghostty",
.features = TTY_FEATURES_BASE_MODERN_XTERM ","
"ccolour,"
"cstyle,"
"extkeys,"
"focus,"
"hyperlinks,"
"osc7,"
"sync,"
"usstyle,"
"progressbar"
},
{ .name = "XTerm",
/*
* xterm also supports DECSLRM and DECFRA, but they can be

View File

@@ -1663,6 +1663,8 @@ tty_keys_extended_device_attributes(struct tty *tty, const char *buf,
tty_default_features(features, "foot", 0);
else if (strncmp(tmp, "WezTerm ", 7) == 0)
tty_default_features(features, "WezTerm", 0);
else if (strncmp(tmp, "ghostty ", 8) == 0)
tty_default_features(features, "ghostty", 0);
log_debug("%s: received extended DA %.*s", c->name, (int)*size, buf);
free(c->term_type);