From aab8b6c44151cb086850ba9872251cfc452506b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 19 Apr 2016 22:43:33 +0200 Subject: vis: add an unsigned option type for :set command --- vis-cmds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index a79bc0e..401d77d 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -42,6 +42,7 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor OPTION_TYPE_STRING, OPTION_TYPE_BOOL, OPTION_TYPE_NUMBER, + OPTION_TYPE_UNSIGNED, } type; bool optional; int index; @@ -134,12 +135,13 @@ static bool cmd_set(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor arg.b = !arg.b; break; case OPTION_TYPE_NUMBER: + case OPTION_TYPE_UNSIGNED: if (!argv[2]) { vis_info_show(vis, "Expecting number"); return false; } /* TODO: error checking? long type */ - arg.i = strtoul(argv[2], NULL, 10); + arg.u = strtoul(argv[2], NULL, 10); break; } -- cgit v1.2.3