Merge pull request #14027 from dylanarmstrong/fix/13955-empty-paste-in-term-segfault

fix: segfault when pasting in term with empty buffer
This commit is contained in:
Björn Linse
2021-04-02 23:15:43 +02:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@@ -580,6 +580,9 @@ static bool is_filter_char(int c)
void terminal_paste(long count, char_u **y_array, size_t y_size)
{
if (y_size == 0) {
return;
}
vterm_keyboard_start_paste(curbuf->terminal->vt);
terminal_flush_output(curbuf->terminal);
size_t buff_len = STRLEN(y_array[0]);