Fix grey colour, from Magnus Gross.
authornicm <nicm@openbsd.org>
Sun, 29 Sep 2024 20:05:42 +0000 (20:05 +0000)
committernicm <nicm@openbsd.org>
Sun, 29 Sep 2024 20:05:42 +0000 (20:05 +0000)
usr.bin/tmux/colour.c
usr.bin/tmux/tmux.c

index 4557812..de832c6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: colour.c,v 1.27 2024/08/26 13:02:15 nicm Exp $ */
+/* $OpenBSD: colour.c,v 1.28 2024/09/29 20:05:42 nicm Exp $ */
 
 /*
  * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -948,7 +948,7 @@ colour_byname(const char *name)
 
        if (strncmp(name, "grey", 4) == 0 || strncmp(name, "gray", 4) == 0) {
                if (name[4] == '\0')
-                       return (-1);
+                       return (0xbebebe|COLOUR_FLAG_RGB);
                c = strtonum(name + 4, 0, 100, &errstr);
                if (errstr != NULL)
                        return (-1);
index 1332bf3..9514860 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.212 2024/05/15 09:59:12 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.213 2024/09/29 20:05:42 nicm Exp $ */
 
 /*
  * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -418,9 +418,9 @@ main(int argc, char **argv)
                        cfg_files[cfg_nfiles++] = xstrdup(optarg);
                        cfg_quiet = 0;
                        break;
-               case 'V':
+               case 'V':
                        printf("tmux %s\n", getversion());
-                       exit(0);
+                       exit(0);
                case 'l':
                        flags |= CLIENT_LOGIN;
                        break;