Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-06-13 21:15:06 +01:00
6 changed files with 24 additions and 19 deletions

View File

@@ -152,7 +152,8 @@ environ_clear(struct environ *env, const char *name)
void void
environ_put(struct environ *env, const char *var, int flags) environ_put(struct environ *env, const char *var, int flags)
{ {
char *name, *value; char *name;
const char *value;
value = strchr(var, '='); value = strchr(var, '=');
if (value == NULL) if (value == NULL)

View File

@@ -3778,7 +3778,7 @@ format_table_compare(const void *key0, const void *entry0)
} }
/* Get a format callback. */ /* Get a format callback. */
static struct format_table_entry * static const struct format_table_entry *
format_table_get(const char *key) format_table_get(const char *key)
{ {
return (bsearch(key, format_table, nitems(format_table), return (bsearch(key, format_table, nitems(format_table),
@@ -4112,7 +4112,7 @@ static char *
format_find(struct format_tree *ft, const char *key, int modifiers, format_find(struct format_tree *ft, const char *key, int modifiers,
const char *time_format) const char *time_format)
{ {
struct format_table_entry *fte; const struct format_table_entry *fte;
void *value; void *value;
struct format_entry *fe, fe_find; struct format_entry *fe, fe_find;
struct environ_entry *envent; struct environ_entry *envent;

View File

@@ -483,7 +483,7 @@ input_key_vt10x(struct bufferevent *bev, key_code key)
{ {
struct utf8_data ud; struct utf8_data ud;
key_code onlykey; key_code onlykey;
char *p; const char *p;
static const char *standard_map[2] = { static const char *standard_map[2] = {
"1!9(0)=+;:'\",<.>/-8? 2", "1!9(0)=+;:'\",<.>/-8? 2",
"119900=+;;'',,..\x1f\x1f\x7f\x7f\0\0", "119900=+;;'',,..\x1f\x1f\x7f\x7f\0\0",

View File

@@ -1365,7 +1365,7 @@ input_esc_dispatch(struct input_ctx *ictx)
{ {
struct screen_write_ctx *sctx = &ictx->ctx; struct screen_write_ctx *sctx = &ictx->ctx;
struct screen *s = sctx->s; struct screen *s = sctx->s;
struct input_table_entry *entry; const struct input_table_entry *entry;
if (ictx->flags & INPUT_DISCARD) if (ictx->flags & INPUT_DISCARD)
return (0); return (0);
@@ -1441,7 +1441,7 @@ input_csi_dispatch(struct input_ctx *ictx)
{ {
struct screen_write_ctx *sctx = &ictx->ctx; struct screen_write_ctx *sctx = &ictx->ctx;
struct screen *s = sctx->s; struct screen *s = sctx->s;
struct input_table_entry *entry; const struct input_table_entry *entry;
struct options *oo; struct options *oo;
int i, n, m, ek, set, p; int i, n, m, ek, set, p;
u_int cx, bg = ictx->cell.cell.bg; u_int cx, bg = ictx->cell.cell.bg;
@@ -3225,7 +3225,7 @@ static int
input_osc_52_parse(struct input_ctx *ictx, const char *p, u_char **out, input_osc_52_parse(struct input_ctx *ictx, const char *p, u_char **out,
int *outlen, char *clip) int *outlen, char *clip)
{ {
char *end; const char *end;
size_t len; size_t len;
const char *allow = "cpqs01234567"; const char *allow = "cpqs01234567";
u_int i, j = 0; u_int i, j = 0;

View File

@@ -431,13 +431,13 @@ key_bindings_init(void)
"bind -N 'Move the visible part of the window left' -r S-Left { refresh-client -L 10 }", "bind -N 'Move the visible part of the window left' -r S-Left { refresh-client -L 10 }",
"bind -N 'Move the visible part of the window right' -r S-Right { refresh-client -R 10 }", "bind -N 'Move the visible part of the window right' -r S-Right { refresh-client -R 10 }",
"bind -N 'Reset so the visible part of the window follows the cursor' -r DC { refresh-client -c }", "bind -N 'Reset so the visible part of the window follows the cursor' -r DC { refresh-client -c }",
"bind -N 'Resize the pane up by 5' -r M-Up { resize-pane -U 5 }", "bind -N 'Resize the pane up by 5' -r M-Up if -F '#{?floating_pane_flag}' { resizep -D-5 } { resize-pane -U 5 }",
"bind -N 'Resize the pane down by 5' -r M-Down { resize-pane -D 5 }", "bind -N 'Resize the pane down by 5' -r M-Down { resize-pane -D 5 }",
"bind -N 'Resize the pane left by 5' -r M-Left { resize-pane -L 5 }", "bind -N 'Resize the pane left by 5' -r M-Left if -F '#{?floating_pane_flag}' { resizep -R-5 } { resize-pane -L 5 }",
"bind -N 'Resize the pane right by 5' -r M-Right { resize-pane -R 5 }", "bind -N 'Resize the pane right by 5' -r M-Right resize-pane -R 5",
"bind -N 'Resize the pane up' -r C-Up { resize-pane -U }", "bind -N 'Resize the pane up' -r C-Up if -F '#{?floating_pane_flag}' { resizep -D-1 } { resize-pane -U }",
"bind -N 'Resize the pane down' -r C-Down { resize-pane -D }", "bind -N 'Resize the pane down' -r C-Down { resize-pane -D }",
"bind -N 'Resize the pane left' -r C-Left { resize-pane -L }", "bind -N 'Resize the pane left' -r C-Left if -F '#{?floating_pane_flag}' { resizep -R-1 } { resize-pane -L }",
"bind -N 'Resize the pane right' -r C-Right { resize-pane -R }", "bind -N 'Resize the pane right' -r C-Right { resize-pane -R }",
/* Menu keys */ /* Menu keys */

View File

@@ -743,6 +743,7 @@ layout_resize_floating_pane(struct window_pane *wp, enum layout_type type,
} }
} }
/* Resize a layout cell. */
void void
layout_resize_layout(struct window *w, struct layout_cell *lc, layout_resize_layout(struct window *w, struct layout_cell *lc,
enum layout_type type, int change, int opposite) enum layout_type type, int change, int opposite)
@@ -788,8 +789,11 @@ layout_resize_pane(struct window_pane *wp, enum layout_type type, int change,
return; return;
/* If this is the last cell, move back one. */ /* If this is the last cell, move back one. */
if (lc == TAILQ_LAST(&lcparent->cells, layout_cells)) if (lc == TAILQ_LAST(&lcparent->cells, layout_cells)) {
do
lc = TAILQ_PREV(lc, layout_cells, entry); lc = TAILQ_PREV(lc, layout_cells, entry);
while (lc->flags & LAYOUT_CELL_FLOATING);
}
layout_resize_layout(wp->window, lc, type, change, opposite); layout_resize_layout(wp->window, lc, type, change, opposite);
} }