mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
Merge branch 'obsd-master'
Sync from OpenBSD. * obsd-master: Add halfpage commands to mode command string table (missed by accident), from Thomas Adam. Clarify some points about config files, notably that they are only read at server start. From Thomas Adam. Use a utility function for common code to show errors in config file, from Thomas Adam.
This commit is contained in:
22
cfg.c
22
cfg.c
@ -173,3 +173,25 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
|
||||
|
||||
return (retval);
|
||||
}
|
||||
|
||||
void
|
||||
show_cfg_causes(struct session *s)
|
||||
{
|
||||
struct window_pane *wp;
|
||||
char *cause;
|
||||
u_int i;
|
||||
|
||||
if (s == NULL || ARRAY_EMPTY(&cfg_causes))
|
||||
return;
|
||||
|
||||
wp = s->curw->window->active;
|
||||
|
||||
window_pane_set_mode(wp, &window_copy_mode);
|
||||
window_copy_init_for_output(wp);
|
||||
for (i = 0; i < ARRAY_LENGTH(&cfg_causes); i++) {
|
||||
cause = ARRAY_ITEM(&cfg_causes, i);
|
||||
window_copy_add(wp, "%s", cause);
|
||||
free(cause);
|
||||
}
|
||||
ARRAY_FREE(&cfg_causes);
|
||||
}
|
||||
|
Reference in New Issue
Block a user