Skip to content

Commit

Permalink
smurf
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk committed May 16, 2016
1 parent 8d33e05 commit b947d88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/nvim/eval.c
Expand Up @@ -21720,7 +21720,12 @@ static void term_close(void *d)
data->exited = true;
process_stop((Process *)&data->proc);
}
queue_put(data->events, term_delayed_free, 1, data);
if (exiting) {
terminal_destroy(data->term);
term_job_data_decref(d);
} else {
queue_put(data->events, term_delayed_free, 1, data);
}
}

static void term_job_data_decref(TerminalJobData *data)
Expand Down
2 changes: 1 addition & 1 deletion src/nvim/terminal.c
Expand Up @@ -309,7 +309,7 @@ void terminal_close(Terminal *term, char *msg)
buf_T *buf = handle_get_buffer(term->buf_handle);

if (!msg || exiting) {
// If no msg was given, this was called by close_buffer(buffer.c). Or if
// If no msg was given, this was called by buffer.c/close_buffer(). Or if
// exiting, we must inform the buffer the terminal no longer exists so that
// close_buffer() doesn't call this again.
term->buf_handle = 0;
Expand Down

0 comments on commit b947d88

Please sign in to comment.