Mercurial > vim
comparison src/terminal.c @ 13219:4b8d89ea9edb v8.0.1484
patch 8.0.1484: reduntant conditions
commit https://github.com/vim/vim/commit/a15ef4588c057da87f64be5b17aef35aaead8ac8
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 9 16:46:00 2018 +0100
patch 8.0.1484: reduntant conditions
Problem: Reduntant conditions.
Solution: Remove them. (Dominique Pelle)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 09 Feb 2018 17:00:07 +0100 |
parents | 53f0c469dfc6 |
children | ac42c4b11dbc |
comparison
equal
deleted
inserted
replaced
13218:146652fabe82 | 13219:4b8d89ea9edb |
---|---|
521 char_u *tofree = NULL; | 521 char_u *tofree = NULL; |
522 | 522 |
523 init_job_options(&opt); | 523 init_job_options(&opt); |
524 | 524 |
525 cmd = eap->arg; | 525 cmd = eap->arg; |
526 while (*cmd && *cmd == '+' && *(cmd + 1) == '+') | 526 while (*cmd == '+' && *(cmd + 1) == '+') |
527 { | 527 { |
528 char_u *p, *ep; | 528 char_u *p, *ep; |
529 | 529 |
530 cmd += 2; | 530 cmd += 2; |
531 p = skiptowhite(cmd); | 531 p = skiptowhite(cmd); |
3257 if (buf->b_term->tl_job->jv_channel == NULL) | 3257 if (buf->b_term->tl_job->jv_channel == NULL) |
3258 /* channel is closed, nothing to do */ | 3258 /* channel is closed, nothing to do */ |
3259 return; | 3259 return; |
3260 | 3260 |
3261 /* Get the job status, this will detect a job that finished. */ | 3261 /* Get the job status, this will detect a job that finished. */ |
3262 if ((buf->b_term->tl_job->jv_channel == NULL | 3262 if (!buf->b_term->tl_job->jv_channel->ch_keep_open |
3263 || !buf->b_term->tl_job->jv_channel->ch_keep_open) | |
3264 && STRCMP(job_status(buf->b_term->tl_job), "dead") == 0) | 3263 && STRCMP(job_status(buf->b_term->tl_job), "dead") == 0) |
3265 { | 3264 { |
3266 /* The job is dead, keep reading channel I/O until the channel is | 3265 /* The job is dead, keep reading channel I/O until the channel is |
3267 * closed. buf->b_term may become NULL if the terminal was closed while | 3266 * closed. buf->b_term may become NULL if the terminal was closed while |
3268 * waiting. */ | 3267 * waiting. */ |