[hackers] [st] Fix title initialization || Quentin Rameau
commit 0b507bb73138c636fd0ad6f2321624aae1346d58
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri Mar 16 16:19:18 2018 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Fri Mar 16 16:44:30 2018 +0100
Fix title initialization
diff --git a/x.c b/x.c
index 06e53d3..d0b26ac 100644
--- a/x.c
+++ b/x.c
_AT_@ -1929,12 +1929,12 @@ main(int argc, char *argv[])
} ARGEND;
run:
- if (argc > 0) {
- /* eat all remaining arguments */
+ if (argc > 0) /* eat all remaining arguments */
opt_cmd = argv;
- if (!opt_title && !opt_line)
- opt_title = basename(xstrdup(argv[0]));
- }
+
+ if (!opt_title)
+ opt_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0];
+
setlocale(LC_CTYPE, "");
XSetLocaleModifiers("");
cols = MAX(cols, 1);
Received on Fri Mar 16 2018 - 16:50:37 CET
This archive was generated by hypermail 2.3.0
: Fri Mar 16 2018 - 17:00:33 CET