mirror of
https://github.com/tmux/tmux.git
synced 2026-10-12 21:54:23 +00:00
Merge branch 'master' into 4902-image-support
This commit is contained in:
53
grid.c
53
grid.c
@@ -18,9 +18,6 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -59,45 +56,6 @@ static const struct grid_cell_entry grid_cleared_entry = {
|
||||
{ .data = { 0, 8, 8, ' ' } }, GRID_FLAG_CLEARED
|
||||
};
|
||||
|
||||
#ifdef __APPLE__
|
||||
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);
|
||||
#ifdef ENABLE_IMAGES
|
||||
assert(gl->images == NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
void
|
||||
grid_check_is_clear(__unused struct grid *gd)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Store cell in entry. */
|
||||
static void
|
||||
grid_store_cell(struct grid_cell_entry *gce, const struct grid_cell *gc,
|
||||
@@ -350,12 +308,6 @@ grid_free_line(struct grid *gd, u_int py)
|
||||
{
|
||||
struct grid_line *gl = &gd->linedata[py];
|
||||
|
||||
#ifdef __APPLE__
|
||||
assert(gl->cellused <= gl->cellsize);
|
||||
assert(gl->extdsize == 0 || gl->extddata != NULL);
|
||||
assert(gl->cellsize == 0 || gl->celldata != NULL);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_IMAGES
|
||||
image_grid_free_line(gd, gl);
|
||||
#endif
|
||||
@@ -390,11 +342,6 @@ grid_create(u_int sx, u_int sy, u_int hlimit)
|
||||
|
||||
if (gd->sy != 0)
|
||||
gd->linedata = xcalloc(gd->sy, sizeof *gd->linedata);
|
||||
|
||||
#ifdef __APPLE__
|
||||
assert(gd->hsize == 0);
|
||||
#endif
|
||||
grid_check_is_clear(gd);
|
||||
return (gd);
|
||||
}
|
||||
|
||||
|
||||
6
screen.c
6
screen.c
@@ -96,12 +96,12 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
|
||||
s->write_list = NULL;
|
||||
s->hyperlinks = NULL;
|
||||
|
||||
screen_reinit(s, 1);
|
||||
screen_reinit(s);
|
||||
}
|
||||
|
||||
/* Reinitialise screen. */
|
||||
void
|
||||
screen_reinit(struct screen *s, int check)
|
||||
screen_reinit(struct screen *s)
|
||||
{
|
||||
s->cx = 0;
|
||||
s->cy = 0;
|
||||
@@ -120,8 +120,6 @@ screen_reinit(struct screen *s, int check)
|
||||
s->saved_cy = UINT_MAX;
|
||||
|
||||
screen_reset_tabs(s);
|
||||
if (check)
|
||||
grid_check_is_clear(s->grid);
|
||||
grid_clear_lines(s->grid, s->grid->hsize, s->grid->sy, 8);
|
||||
|
||||
screen_clear_selection(s);
|
||||
|
||||
2
spawn.c
2
spawn.c
@@ -327,7 +327,7 @@ spawn_pane(struct spawn_context *sc, char **cause)
|
||||
sc->wp0->fd = -1;
|
||||
}
|
||||
window_pane_reset_mode_all(sc->wp0);
|
||||
screen_reinit(&sc->wp0->base, 0);
|
||||
screen_reinit(&sc->wp0->base);
|
||||
if (sc->wp0->ictx != NULL) {
|
||||
input_free(sc->wp0->ictx);
|
||||
sc->wp0->ictx = NULL;
|
||||
|
||||
2
tmux.h
2
tmux.h
@@ -3793,7 +3793,7 @@ int redraw_get_status_border_cell_type(struct redraw_span **, u_int);
|
||||
|
||||
/* screen.c */
|
||||
void screen_init(struct screen *, u_int, u_int, u_int);
|
||||
void screen_reinit(struct screen *, int);
|
||||
void screen_reinit(struct screen *);
|
||||
void screen_free(struct screen *);
|
||||
void screen_reset_tabs(struct screen *);
|
||||
void screen_reset_hyperlinks(struct screen *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tty-draw.c,v 1.17 2026/09/22 06:49:47 nicm Exp $ */
|
||||
/* $OpenBSD: tty-draw.c,v 1.18 2026/10/12 15:28:45 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -269,7 +269,7 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx,
|
||||
#endif
|
||||
empty = nx - i;
|
||||
|
||||
/* Flush the background before clearing the tail. */
|
||||
/* Flush the background before clearing. */
|
||||
if (empty != 0 && gcp->bg != last.bg)
|
||||
empty = 0;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user