Mercurial > vim
comparison src/terminal.c @ 11804:5630978ae089 v8.0.0784
patch 8.0.0784: job of terminal may be garbage collected
commit https://github.com/vim/vim/commit/a2c45a17c174d815fd1d160f92ec6c277201e111
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 27 22:14:59 2017 +0200
patch 8.0.0784: job of terminal may be garbage collected
Problem: Job of terminal may be garbage collected.
Solution: Set copyID on job in terminal. (Ozaki Kiichi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 27 Jul 2017 22:30:04 +0200 |
parents | b1fd49b4eea7 |
children | d3d0db111d17 |
comparison
equal
deleted
inserted
replaced
11803:2b560ad4ffce | 11804:5630978ae089 |
---|---|
1369 if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK) | 1369 if (part < PART_COUNT && mch_report_winsize(fd, rows, cols) == OK) |
1370 mch_stop_job(term->tl_job, (char_u *)"winch"); | 1370 mch_stop_job(term->tl_job, (char_u *)"winch"); |
1371 } | 1371 } |
1372 } | 1372 } |
1373 | 1373 |
1374 /* | |
1375 * Mark references in jobs of terminals. | |
1376 */ | |
1377 int | |
1378 set_ref_in_term(int copyID) | |
1379 { | |
1380 int abort = FALSE; | |
1381 term_T *term; | |
1382 typval_T tv; | |
1383 | |
1384 for (term = first_term; term != NULL; term = term->tl_next) | |
1385 if (term->tl_job != NULL) | |
1386 { | |
1387 tv.v_type = VAR_JOB; | |
1388 tv.vval.v_job = term->tl_job; | |
1389 abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL); | |
1390 } | |
1391 return abort; | |
1392 } | |
1393 | |
1374 # endif | 1394 # endif |
1375 | 1395 |
1376 #endif /* FEAT_TERMINAL */ | 1396 #endif /* FEAT_TERMINAL */ |