Mercurial > vim
comparison src/terminal.c @ 15555:d89c5b339c2a v8.1.0785
patch 8.1.0785: depending on the configuration some functions are unused
commit https://github.com/vim/vim/commit/113e10721f42fc2500b63fe95193f8665658a90c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 20 15:30:40 2019 +0100
patch 8.1.0785: depending on the configuration some functions are unused
Problem: Depending on the configuration some functions are unused.
Solution: Add more #ifdefs, remove unused functions. (Dominique Pelle,
closes #3822)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Jan 2019 15:45:07 +0100 |
parents | 247511eadb7a |
children | d4a6d575e910 |
comparison
equal
deleted
inserted
replaced
15554:496f146a0836 | 15555:d89c5b339c2a |
---|---|
2305 may_move_terminal_to_buffer(curbuf->b_term, FALSE); | 2305 may_move_terminal_to_buffer(curbuf->b_term, FALSE); |
2306 | 2306 |
2307 return ret; | 2307 return ret; |
2308 } | 2308 } |
2309 | 2309 |
2310 /* | |
2311 * Called when a job has finished. | |
2312 * This updates the title and status, but does not close the vterm, because | |
2313 * there might still be pending output in the channel. | |
2314 */ | |
2315 void | |
2316 term_job_ended(job_T *job) | |
2317 { | |
2318 term_T *term; | |
2319 int did_one = FALSE; | |
2320 | |
2321 for (term = first_term; term != NULL; term = term->tl_next) | |
2322 if (term->tl_job == job) | |
2323 { | |
2324 VIM_CLEAR(term->tl_title); | |
2325 VIM_CLEAR(term->tl_status_text); | |
2326 redraw_buf_and_status_later(term->tl_buffer, VALID); | |
2327 did_one = TRUE; | |
2328 } | |
2329 if (did_one) | |
2330 redraw_statuslines(); | |
2331 if (curbuf->b_term != NULL) | |
2332 { | |
2333 if (curbuf->b_term->tl_job == job) | |
2334 maketitle(); | |
2335 update_cursor(curbuf->b_term, TRUE); | |
2336 } | |
2337 } | |
2338 | |
2339 static void | 2310 static void |
2340 may_toggle_cursor(term_T *term) | 2311 may_toggle_cursor(term_T *term) |
2341 { | 2312 { |
2342 if (in_terminal_loop == term) | 2313 if (in_terminal_loop == term) |
2343 { | 2314 { |
3070 { | 3041 { |
3071 int save_p_more = p_more; | 3042 int save_p_more = p_more; |
3072 | 3043 |
3073 p_more = FALSE; | 3044 p_more = FALSE; |
3074 msg_row = Rows - 1; | 3045 msg_row = Rows - 1; |
3075 msg_puts((char_u *)"\n"); | 3046 msg_puts("\n"); |
3076 p_more = save_p_more; | 3047 p_more = save_p_more; |
3077 --term->tl_toprow; | 3048 --term->tl_toprow; |
3078 } | 3049 } |
3079 | 3050 |
3080 for (pos.row = term->tl_dirty_row_start; pos.row < term->tl_dirty_row_end | 3051 for (pos.row = term->tl_dirty_row_start; pos.row < term->tl_dirty_row_end |
5406 channel_send(ch, PART_IN, (char_u *)"\004\r", 2, NULL); | 5377 channel_send(ch, PART_IN, (char_u *)"\004\r", 2, NULL); |
5407 # endif | 5378 # endif |
5408 } | 5379 } |
5409 } | 5380 } |
5410 | 5381 |
5382 #if defined(FEAT_GUI) || defined(PROTO) | |
5411 job_T * | 5383 job_T * |
5412 term_getjob(term_T *term) | 5384 term_getjob(term_T *term) |
5413 { | 5385 { |
5414 return term != NULL ? term->tl_job : NULL; | 5386 return term != NULL ? term->tl_job : NULL; |
5415 } | 5387 } |
5388 #endif | |
5416 | 5389 |
5417 # if defined(WIN3264) || defined(PROTO) | 5390 # if defined(WIN3264) || defined(PROTO) |
5418 | 5391 |
5419 /************************************** | 5392 /************************************** |
5420 * 2. MS-Windows implementation. | 5393 * 2. MS-Windows implementation. |