summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-14 20:56:31 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-14 20:56:31 +0200
commit4d5d0dfe9438bd5f2daa41ebbe6ac9a76d165af0 (patch)
tree190b1111603f2aaf7f13b2ddb044ef5f61ade468 /src/os_unix.c
parent6c2b7b8055b96463f78abb70f58c4c6d6d4b9d55 (diff)
downloadvim-git-4d5d0dfe9438bd5f2daa41ebbe6ac9a76d165af0.tar.gz
patch 8.2.0579: Coverity warns for unused valuev8.2.0579
Problem: Coverity warns for unused value. Solution: Change order and use "else if".
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 397342c68..c6d386b92 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5491,13 +5491,14 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal)
term = getenv("TERM");
#endif
// Use 'term' or $TERM if it starts with "xterm", otherwise fall
- // back to "xterm".
+ // back to "xterm" or "xterm-color".
if (term == NULL || *term == NUL || STRNCMP(term, "xterm", 5) != 0)
{
- if (t_colors > 16)
- term = "xterm-color";
if (t_colors >= 256)
+ // TODO: should we check this name is supported?
term = "xterm-256color";
+ else if (t_colors > 16)
+ term = "xterm-color";
else
term = "xterm";
}