Mercurial > vim
comparison src/buffer.c @ 29038:ad99b7b9df13 v8.2.5041
patch 8.2.5041: cannot close a terminal popup with "NONE" job
Commit: https://github.com/vim/vim/commit/9e636b9d2ef54552383daebf290d916b3d001823
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 29 22:37:05 2022 +0100
patch 8.2.5041: cannot close a terminal popup with "NONE" job
Problem: Cannot close a terminal popup with "NONE" job.
Solution: Adjust the conditions for whether a job is running.
(closes #10498)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 May 2022 23:45:03 +0200 |
parents | 6cdf55afaae9 |
children | e150d0e4701f |
comparison
equal
deleted
inserted
replaced
29037:28cdce891562 | 29038:ad99b7b9df13 |
---|---|
3280 for (buf = firstbuf; buf != NULL && !got_int; buf = buf->b_next) | 3280 for (buf = firstbuf; buf != NULL && !got_int; buf = buf->b_next) |
3281 #endif | 3281 #endif |
3282 { | 3282 { |
3283 #ifdef FEAT_TERMINAL | 3283 #ifdef FEAT_TERMINAL |
3284 job_running = term_job_running(buf->b_term); | 3284 job_running = term_job_running(buf->b_term); |
3285 job_none_open = job_running && term_none_open(buf->b_term); | 3285 job_none_open = term_none_open(buf->b_term); |
3286 #endif | 3286 #endif |
3287 // skip unlisted buffers, unless ! was used | 3287 // skip unlisted buffers, unless ! was used |
3288 if ((!buf->b_p_bl && !eap->forceit && !vim_strchr(eap->arg, 'u')) | 3288 if ((!buf->b_p_bl && !eap->forceit && !vim_strchr(eap->arg, 'u')) |
3289 || (vim_strchr(eap->arg, 'u') && buf->b_p_bl) | 3289 || (vim_strchr(eap->arg, 'u') && buf->b_p_bl) |
3290 || (vim_strchr(eap->arg, '+') | 3290 || (vim_strchr(eap->arg, '+') |
3316 continue; | 3316 continue; |
3317 | 3317 |
3318 changed_char = (buf->b_flags & BF_READERR) ? 'x' | 3318 changed_char = (buf->b_flags & BF_READERR) ? 'x' |
3319 : (bufIsChanged(buf) ? '+' : ' '); | 3319 : (bufIsChanged(buf) ? '+' : ' '); |
3320 #ifdef FEAT_TERMINAL | 3320 #ifdef FEAT_TERMINAL |
3321 if (term_job_running(buf->b_term)) | 3321 if (job_running) |
3322 { | 3322 { |
3323 if (term_none_open(buf->b_term)) | 3323 if (job_none_open) |
3324 ro_char = '?'; | 3324 ro_char = '?'; |
3325 else | 3325 else |
3326 ro_char = 'R'; | 3326 ro_char = 'R'; |
3327 changed_char = ' '; // bufIsChanged() returns TRUE to avoid | 3327 changed_char = ' '; // bufIsChanged() returns TRUE to avoid |
3328 // closing, but it's not actually changed. | 3328 // closing, but it's not actually changed. |