diff options
-rw-r--r-- | src/eval.c | 4 | ||||
-rw-r--r-- | src/proto/terminal.pro | 1 | ||||
-rw-r--r-- | src/terminal.c | 20 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 27 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 401171c9b..4cb32893f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5329,6 +5329,10 @@ garbage_collect(int testing) abort = abort || set_ref_in_quickfix(copyID); #endif +#ifdef FEAT_TERMINAL + abort = abort || set_ref_in_term(copyID); +#endif + if (!abort) { /* diff --git a/src/proto/terminal.pro b/src/proto/terminal.pro index d7d153850..ac0beb51d 100644 --- a/src/proto/terminal.pro +++ b/src/proto/terminal.pro @@ -6,4 +6,5 @@ void terminal_loop(void); void term_job_ended(job_T *job); void term_update_window(win_T *wp); char_u *term_get_status_text(term_T *term); +int set_ref_in_term(int copyID); /* vim: set ft=c : */ diff --git a/src/terminal.c b/src/terminal.c index 6d8679d39..c4e1a5208 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1371,6 +1371,26 @@ term_report_winsize(term_T *term, int rows, int cols) } } +/* + * Mark references in jobs of terminals. + */ + int +set_ref_in_term(int copyID) +{ + int abort = FALSE; + term_T *term; + typval_T tv; + + for (term = first_term; term != NULL; term = term->tl_next) + if (term->tl_job != NULL) + { + tv.v_type = VAR_JOB; + tv.vval.v_job = term->tl_job; + abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL); + } + return abort; +} + # endif #endif /* FEAT_TERMINAL */ diff --git a/src/version.c b/src/version.c index 1b13fd337..43ea98a80 100644 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 784, +/**/ 783, /**/ 782, |