mirror of
https://github.com/tmux/tmux.git
synced 2026-07-03 09:12:20 +00:00
Merge branch 'master' into command_parser
This commit is contained in:
10
CHANGES
10
CHANGES
@@ -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
48
grid.c
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
2
screen.c
2
screen.c
@@ -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);
|
||||
|
||||
@@ -2048,19 +2048,18 @@ server_client_reset_state(struct client *c)
|
||||
if (!window_position_is_visible(r, cx))
|
||||
cursor = 0;
|
||||
|
||||
if (window_pane_scrollbar_overlay_visible(wp)) {
|
||||
sb_w = wp->scrollbar_style.width;
|
||||
if (sb_w > wp->sx)
|
||||
sb_w = wp->sx;
|
||||
if (sb_w != 0 &&
|
||||
w->sb_pos ==
|
||||
PANE_SCROLLBARS_LEFT) {
|
||||
if (s->cx < sb_w)
|
||||
if (window_pane_scrollbar_overlay_visible(wp)) {
|
||||
sb_w = wp->scrollbar_style.width;
|
||||
if (sb_w > wp->sx)
|
||||
sb_w = wp->sx;
|
||||
if (sb_w != 0 &&
|
||||
w->sb_pos == PANE_SCROLLBARS_LEFT) {
|
||||
if (s->cx < sb_w)
|
||||
cursor = 0;
|
||||
} else if (sb_w != 0 &&
|
||||
s->cx >= wp->sx - sb_w)
|
||||
cursor = 0;
|
||||
} else if (sb_w != 0 &&
|
||||
s->cx >= wp->sx - sb_w)
|
||||
cursor = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (status_at_line(c) == 0)
|
||||
cy += status_line_size(c);
|
||||
@@ -2089,10 +2088,10 @@ server_client_reset_state(struct client *c)
|
||||
mode |= MODE_MOUSE_ALL;
|
||||
}
|
||||
}
|
||||
if (options_get_number(oo, "focus-follows-mouse") ||
|
||||
w->sb == PANE_SCROLLBARS_MODAL ||
|
||||
w->sb == PANE_SCROLLBARS_AUTOHIDE)
|
||||
mode |= MODE_MOUSE_ALL;
|
||||
if (options_get_number(oo, "focus-follows-mouse") ||
|
||||
w->sb == PANE_SCROLLBARS_MODAL ||
|
||||
w->sb == PANE_SCROLLBARS_AUTOHIDE)
|
||||
mode |= MODE_MOUSE_ALL;
|
||||
else if (~mode & MODE_MOUSE_ALL)
|
||||
mode |= MODE_MOUSE_BUTTON;
|
||||
}
|
||||
|
||||
1
tmux.h
1
tmux.h
@@ -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 *);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user