patch 8.0.0718: output of job in terminal is not displayed
Problem: Output of job in terminal is not displayed.
Solution: Connect the job output to the terminal.
diff --git a/src/screen.c b/src/screen.c
index a7e881e..944eecd 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -126,13 +126,6 @@
#endif
static int win_line(win_T *, linenr_T, int, int, int nochange, proftime_T *syntax_tm);
static int char_needs_redraw(int off_from, int off_to, int cols);
-#ifdef FEAT_RIGHTLEFT
-static void screen_line(int row, int coloff, int endcol, int clear_width, int rlflag);
-# define SCREEN_LINE(r, o, e, c, rl) screen_line((r), (o), (e), (c), (rl))
-#else
-static void screen_line(int row, int coloff, int endcol, int clear_width);
-# define SCREEN_LINE(r, o, e, c, rl) screen_line((r), (o), (e), (c))
-#endif
#ifdef FEAT_WINDOWS
static void draw_vsep_win(win_T *wp, int row);
#endif
@@ -411,7 +404,7 @@
screenline2 + r * cols,
(size_t)cols * sizeof(schar_T));
#endif
- SCREEN_LINE(cmdline_row + r, 0, cols, cols, FALSE);
+ screen_line(cmdline_row + r, 0, cols, cols, FALSE);
}
ret = 4;
}
@@ -1192,6 +1185,17 @@
}
#endif
+#ifdef FEAT_TERMINAL
+ if (wp->w_buffer->b_term != NULL)
+ {
+ /* This window contains a terminal, redraw works completely
+ * differently. */
+ term_update_window(wp);
+ wp->w_redr_type = 0;
+ return;
+ }
+#endif
+
#ifdef FEAT_SEARCH_EXTRA
init_search_hl(wp);
#endif
@@ -2886,7 +2890,7 @@
}
#endif
- SCREEN_LINE(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp),
+ screen_line(row + W_WINROW(wp), W_WINCOL(wp), (int)W_WIDTH(wp),
(int)W_WIDTH(wp), FALSE);
/*
@@ -3996,7 +4000,7 @@
#endif
)
{
- SCREEN_LINE(screen_row, W_WINCOL(wp), col, -(int)W_WIDTH(wp),
+ screen_line(screen_row, W_WINCOL(wp), col, -(int)W_WIDTH(wp),
wp->w_p_rl);
/* Pretend we have finished updating the window. Except when
* 'cursorcolumn' is set. */
@@ -5443,7 +5447,7 @@
}
#endif
- SCREEN_LINE(screen_row, W_WINCOL(wp), col,
+ screen_line(screen_row, W_WINCOL(wp), col,
(int)W_WIDTH(wp), wp->w_p_rl);
row++;
@@ -5749,11 +5753,11 @@
)
{
#ifdef FEAT_CONCEAL
- SCREEN_LINE(screen_row, W_WINCOL(wp), col - boguscols,
+ screen_line(screen_row, W_WINCOL(wp), col - boguscols,
(int)W_WIDTH(wp), wp->w_p_rl);
boguscols = 0;
#else
- SCREEN_LINE(screen_row, W_WINCOL(wp), col,
+ screen_line(screen_row, W_WINCOL(wp), col,
(int)W_WIDTH(wp), wp->w_p_rl);
#endif
++row;
@@ -5959,6 +5963,17 @@
return FALSE;
}
+#if defined(FEAT_TERMINAL) || defined(PROTO)
+/*
+ * Return the index in ScreenLines[] for the current screen line.
+ */
+ int
+screen_get_current_line_off()
+{
+ return (int)(current_ScreenLine - ScreenLines);
+}
+#endif
+
/*
* Move one "cooked" screen line to the screen, but only the characters that
* have actually changed. Handle insert/delete character.
@@ -5970,16 +5985,13 @@
* When TRUE and "clear_width" > 0, clear columns 0 to "endcol"
* When FALSE and "clear_width" > 0, clear columns "endcol" to "clear_width"
*/
- static void
+ void
screen_line(
int row,
int coloff,
int endcol,
- int clear_width
-#ifdef FEAT_RIGHTLEFT
- , int rlflag
-#endif
- )
+ int clear_width,
+ int rlflag UNUSED)
{
unsigned off_from;
unsigned off_to;