Correct client_prefix so it returns 1 if in prefix, not 0.
authornicm <nicm@openbsd.org>
Wed, 24 Feb 2021 09:22:15 +0000 (09:22 +0000)
committernicm <nicm@openbsd.org>
Wed, 24 Feb 2021 09:22:15 +0000 (09:22 +0000)
usr.bin/tmux/format.c

index 98bf7b0..abeb953 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.276 2021/02/22 08:18:13 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.277 2021/02/24 09:22:15 nicm Exp $ */
 
 /*
  * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1319,8 +1319,8 @@ format_cb_client_prefix(struct format_tree *ft)
        if (ft->c != NULL) {
                name = server_client_get_key_table(ft->c);
                if (strcmp(ft->c->keytable->name, name) == 0)
-                       return (xstrdup("1"));
-               return (xstrdup("0"));
+                       return (xstrdup("0"));
+               return (xstrdup("1"));
        }
        return (NULL);
 }