Remove bits to disable removing empty lines since actually we want to do

that - zoom added them in the first place.
This commit is contained in:
nicm
2026-07-19 19:53:11 +00:00
committed by tmux update bot
parent 8024fab1f2
commit aea209b142
3 changed files with 6 additions and 21 deletions

3
tmux.h
View File

@@ -1,4 +1,4 @@
/* $OpenBSD: tmux.h,v 1.1409 2026/07/17 16:03:15 nicm Exp $ */
/* $OpenBSD: tmux.h,v 1.1410 2026/07/19 19:53:11 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1277,7 +1277,6 @@ struct window_pane {
#define PANE_DESTROYED 0x10000
#define PANE_CMDRUNNING 0x20000
#define PANE_ACTIVITY 0x40000
#define PANE_NORESIZETRIM 0x80000
bitstr_t *sync_dirty;
u_int sync_dirty_size;

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window-panes.c,v 1.2 2026/07/17 16:03:15 nicm Exp $ */
/* $OpenBSD: window-panes.c,v 1.3 2026/07/19 19:53:11 nicm Exp $ */
/*
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -966,10 +966,8 @@ window_panes_free(struct window_mode_entry *wme)
evtimer_del(&data->timer);
if (data->zoomed == 0) {
wme->wp->flags |= PANE_NORESIZETRIM;
if (data->zoomed == 0)
server_unzoom_window(w);
}
server_redraw_window(w);
server_redraw_window_borders(w);
server_status_window(w);
@@ -1092,11 +1090,8 @@ window_panes_key(struct window_mode_entry *wme, struct client *c,
return;
}
if (wp->window->flags & WINDOW_ZOOMED) {
if (data->zoomed == 0)
wp->flags |= PANE_NORESIZETRIM;
if (wp->window->flags & WINDOW_ZOOMED)
window_unzoom(wp->window, 1);
}
window_panes_run_command(data, c, target);
window_pane_reset_mode(wp);
}

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: window.c,v 1.365 2026/07/17 16:03:15 nicm Exp $ */
/* $OpenBSD: window.c,v 1.366 2026/07/19 19:53:11 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1556,12 +1556,6 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
struct window_pane_resize *r;
struct event_payload *ep;
struct cmd_find_state fs;
int trim = 1;
if (wp->flags & PANE_NORESIZETRIM) {
wp->flags &= ~PANE_NORESIZETRIM;
trim = 0;
}
if (sx == wp->sx && sy == wp->sy)
return;
@@ -1579,10 +1573,7 @@ window_pane_resize(struct window_pane *wp, u_int sx, u_int sy)
wp->sy = sy;
log_debug("%s: %%%u resize %ux%u", __func__, wp->id, sx, sy);
if (wp->base.saved_grid == NULL)
screen_resize_cursor(&wp->base, sx, sy, 1, trim, 1);
else
screen_resize_cursor(&wp->base, sx, sy, 0, trim, 1);
screen_resize(&wp->base, sx, sy, wp->base.saved_grid == NULL);
wme = TAILQ_FIRST(&wp->modes);
if (wme != NULL && wme->mode->resize != NULL)