version 1.119, 2017/12/22 10:18:51 |
version 1.120, 2018/10/18 08:38:01 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
|
#include <fnmatch.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
|
|
} |
} |
if (strcmp(name, "pane-border-status") == 0) { |
if (strcmp(name, "pane-border-status") == 0) { |
RB_FOREACH(w, windows, &windows) |
RB_FOREACH(w, windows, &windows) |
layout_fix_panes(w, w->sx, w->sy); |
layout_fix_panes(w); |
} |
} |
RB_FOREACH(s, sessions, &sessions) |
RB_FOREACH(s, sessions, &sessions) |
status_update_saved(s); |
status_update_saved(s); |
|
|
int append = args_has(args, 'a'); |
int append = args_has(args, 'a'); |
struct options_entry *o; |
struct options_entry *o; |
long long number; |
long long number; |
const char *errstr; |
const char *errstr, *new; |
|
char *old; |
key_code key; |
key_code key; |
|
|
oe = options_table_entry(parent); |
oe = options_table_entry(parent); |
|
|
|
|
switch (oe->type) { |
switch (oe->type) { |
case OPTIONS_TABLE_STRING: |
case OPTIONS_TABLE_STRING: |
|
old = xstrdup(options_get_string(oo, oe->name)); |
options_set_string(oo, oe->name, append, "%s", value); |
options_set_string(oo, oe->name, append, "%s", value); |
|
new = options_get_string(oo, oe->name); |
|
if (oe->pattern != NULL && fnmatch(oe->pattern, new, 0) != 0) { |
|
options_set_string(oo, oe->name, 0, "%s", old); |
|
free(old); |
|
cmdq_error(item, "value is invalid: %s", value); |
|
return (-1); |
|
} |
|
free(old); |
return (0); |
return (0); |
case OPTIONS_TABLE_NUMBER: |
case OPTIONS_TABLE_NUMBER: |
number = strtonum(value, oe->minimum, oe->maximum, &errstr); |
number = strtonum(value, oe->minimum, oe->maximum, &errstr); |