Permalink
Browse files

patch 8.0.0797: finished job in terminal window is not handled

Problem:    Finished job in terminal window is not handled.
Solution:   Add the scrollback buffer.  Use it to fill the buffer when the job
            has ended.
  • Loading branch information...
brammool committed Jul 28, 2017
1 parent d973bcb commit d85f271bf8516dbd90be4d18f905f0abbfcd6db6
Showing with 281 additions and 80 deletions.
  1. +1 −1 src/buffer.c
  2. +4 −4 src/channel.c
  3. +3 −0 src/os_unix.c
  4. +4 −4 src/proto/terminal.pro
  5. +5 −6 src/screen.c
  6. +262 −65 src/terminal.c
  7. +2 −0 src/version.c
View
@@ -858,7 +858,7 @@ free_buffer(buf_T *buf)
channel_buffer_free(buf);
#endif
#ifdef FEAT_TERMINAL
free_terminal(buf->b_term);
free_terminal(buf);
#endif
buf_hashtab_remove(buf);
View
@@ -2921,6 +2921,10 @@ channel_close(channel_T *channel, int invoke_close_cb)
}
channel->ch_nb_close_cb = NULL;
#ifdef FEAT_TERMINAL
term_channel_closed(channel);
#endif
}
/*
@@ -4696,10 +4700,6 @@ job_cleanup(job_T *job)
* not use "job" after this! */
job_free(job);
}
#ifdef FEAT_TERMINAL
term_job_ended(job);
#endif
}
/*
View
@@ -412,6 +412,9 @@ mch_inchar(
#ifdef MESSAGE_QUEUE
parse_queued_messages();
/* If input was put directly in typeahead buffer bail out here. */
if (typebuf_changed(tb_change_cnt))
return 0;
#endif
if (wtime < 0 && did_start_blocking)
/* blocking and already waited for p_ut */
View
@@ -1,10 +1,10 @@
/* terminal.c */
void ex_terminal(exarg_T *eap);
void free_terminal(term_T *term);
void free_terminal(buf_T *buf);
void write_to_term(buf_T *buffer, char_u *msg, channel_T *channel);
void terminal_loop(void);
void term_job_ended(job_T *job);
void term_update_window(win_T *wp);
int terminal_loop(void);
void term_channel_closed(channel_T *ch);
int 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 : */
View
@@ -1200,11 +1200,10 @@ win_update(win_T *wp)
#endif
#ifdef FEAT_TERMINAL
if (wp->w_buffer->b_term != NULL)
/* If this window contains a terminal, redraw works completely differently.
*/
if (term_update_window(wp) == OK)
{
/* This window contains a terminal, redraw works completely
* differently. */
term_update_window(wp);
wp->w_redr_type = 0;
return;
}
@@ -6849,14 +6848,14 @@ win_redr_status(win_T *wp)
p = NameBuff;
len = (int)STRLEN(p);
if (wp->w_buffer->b_help
if (bt_help(wp->w_buffer)
#ifdef FEAT_QUICKFIX
|| wp->w_p_pvw
#endif
|| bufIsChanged(wp->w_buffer)
|| wp->w_buffer->b_p_ro)
*(p + len++) = ' ';
if (wp->w_buffer->b_help)
if (bt_help(wp->w_buffer))
{
STRCPY(p + len, _("[Help]"));
len += (int)STRLEN(p + len);
Oops, something went wrong.

0 comments on commit d85f271

Please sign in to comment.