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)
diff --git a/src/terminal.c b/src/terminal.c
index 09b6072..d485b74 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -2307,35 +2307,6 @@
return ret;
}
-/*
- * Called when a job has finished.
- * This updates the title and status, but does not close the vterm, because
- * there might still be pending output in the channel.
- */
- void
-term_job_ended(job_T *job)
-{
- term_T *term;
- int did_one = FALSE;
-
- for (term = first_term; term != NULL; term = term->tl_next)
- if (term->tl_job == job)
- {
- VIM_CLEAR(term->tl_title);
- VIM_CLEAR(term->tl_status_text);
- redraw_buf_and_status_later(term->tl_buffer, VALID);
- did_one = TRUE;
- }
- if (did_one)
- redraw_statuslines();
- if (curbuf->b_term != NULL)
- {
- if (curbuf->b_term->tl_job == job)
- maketitle();
- update_cursor(curbuf->b_term, TRUE);
- }
-}
-
static void
may_toggle_cursor(term_T *term)
{
@@ -3072,7 +3043,7 @@
p_more = FALSE;
msg_row = Rows - 1;
- msg_puts((char_u *)"\n");
+ msg_puts("\n");
p_more = save_p_more;
--term->tl_toprow;
}
@@ -5408,11 +5379,13 @@
}
}
+#if defined(FEAT_GUI) || defined(PROTO)
job_T *
term_getjob(term_T *term)
{
return term != NULL ? term->tl_job : NULL;
}
+#endif
# if defined(WIN3264) || defined(PROTO)