vim-patch:8.1.0069: cannot handle pressing CTRL-C in a prompt buffer

Problem:    Cannot handle pressing CTRL-C in a prompt buffer.
Solution:   Add prompt_setinterrupt().
0e5979a6d4
This commit is contained in:
erw7
2019-05-23 06:38:02 +09:00
parent 783aecd501
commit fe395ae210
6 changed files with 77 additions and 10 deletions

View File

@@ -765,6 +765,7 @@ static void free_buffer(buf_T *buf)
tv_dict_unref(buf->additional_data);
xfree(buf->b_prompt_text);
callback_free(&buf->b_prompt_callback);
callback_free(&buf->b_prompt_interrupt);
clear_fmark(&buf->b_last_cursor);
clear_fmark(&buf->b_last_insert);
clear_fmark(&buf->b_last_change);
@@ -1879,6 +1880,7 @@ buf_T * buflist_new(char_u *ffname, char_u *sfname, linenr_T lnum, int flags)
}
buf->b_prompt_callback.type = kCallbackNone;
buf->b_prompt_interrupt.type = kCallbackNone;
buf->b_prompt_text = NULL;
return buf;