mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Single loop coloring
This commit is contained in:
parent
078c982f4e
commit
2ae1cca96a
|
@ -4105,7 +4105,8 @@ int main(int argc, char *argv[])
|
|||
if (cfg.showcolor) {
|
||||
copier = xgetenv(env_cfg[NNN_CONTEXT_COLORS], "4444");
|
||||
opt = 0;
|
||||
while (*copier && opt < CTX_MAX) {
|
||||
while (opt < CTX_MAX) {
|
||||
if (*copier) {
|
||||
if (*copier < '0' || *copier > '7') {
|
||||
fprintf(stderr, "invalid color code\n");
|
||||
return 1;
|
||||
|
@ -4113,11 +4114,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
g_ctx[opt].color = *copier - '0';
|
||||
++copier;
|
||||
++opt;
|
||||
}
|
||||
|
||||
while (opt != CTX_MAX) {
|
||||
} else
|
||||
g_ctx[opt].color = 4;
|
||||
|
||||
++opt;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue