Hide struct args behind a couple of accessor functions.

This commit is contained in:
nicm
2021-08-20 19:50:16 +00:00
parent de94a344f6
commit 5f32b7d961
41 changed files with 355 additions and 306 deletions

View File

@ -95,10 +95,11 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
}
server_unzoom_window(w);
if (args->argc == 0)
if (args_count(args) == 0)
adjust = 1;
else {
adjust = strtonum(args->argv[0], 1, INT_MAX, &errstr);
adjust = strtonum(args_string(args, 0), 1, INT_MAX,
&errstr);
if (errstr != NULL) {
cmdq_error(item, "adjustment %s", errstr);
return (CMD_RETURN_ERROR);