Fix floating pane redraw bugs. Allow floating panes to be partly out of the window. This required changing xoff and yoff from u_int to int and it required a fair bit of casting for example when xoff is added to sx or comparing px to xoff. It makes sense for px and sx to be u_int since they refers to things which should never be negative.

This commit is contained in:
Michael Grant
2025-11-01 21:47:54 +01:00
parent 34e858ea05
commit 6dd552d689
9 changed files with 119 additions and 87 deletions

10
tmux.h
View File

@@ -1058,8 +1058,8 @@ struct screen_redraw_ctx {
u_int sx;
u_int sy;
u_int ox;
u_int oy;
int ox;
int oy;
};
/* Screen size. */
@@ -1154,8 +1154,8 @@ struct window_pane {
u_int sx;
u_int sy;
u_int xoff;
u_int yoff;
int xoff;
int yoff;
int flags;
#define PANE_REDRAW 0x1
@@ -3266,7 +3266,7 @@ struct window_pane *window_pane_find_by_id_str(const char *);
struct window_pane *window_pane_find_by_id(u_int);
int window_pane_destroy_ready(struct window_pane *);
void window_pane_resize(struct window_pane *, u_int, u_int);
void window_pane_move(struct window_pane *, u_int, u_int);
void window_pane_move(struct window_pane *, int, int);
int window_pane_set_mode(struct window_pane *,
struct window_pane *, const struct window_mode *,
struct cmd_find_state *, struct args *);