aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index b916660024..5ff7f721ba 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -895,13 +895,13 @@ static bool is_filter_char(int c)
return !!(tpf_flags & flag);
}
-void terminal_paste(int count, char **y_array, size_t y_size)
+void terminal_paste(int count, String *y_array, size_t y_size)
{
if (y_size == 0) {
return;
}
vterm_keyboard_start_paste(curbuf->terminal->vt);
- size_t buff_len = strlen(y_array[0]);
+ size_t buff_len = y_array[0].size;
char *buff = xmalloc(buff_len);
for (int i = 0; i < count; i++) {
// feed the lines to the terminal
@@ -914,13 +914,13 @@ void terminal_paste(int count, char **y_array, size_t y_size)
terminal_send(curbuf->terminal, "\n", 1);
#endif
}
- size_t len = strlen(y_array[j]);
+ size_t len = y_array[j].size;
if (len > buff_len) {
buff = xrealloc(buff, len);
buff_len = len;
}
char *dst = buff;
- char *src = y_array[j];
+ char *src = y_array[j].data;
while (*src != NUL) {
len = (size_t)utf_ptr2len(src);
int c = utf_ptr2char(src);
@@ -1178,9 +1178,10 @@ static int term_settermprop(VTermProp prop, VTermValue *val, void *data)
return 1;
}
+/// Called when the terminal wants to ring the system bell.
static int term_bell(void *data)
{
- ui_call_bell();
+ vim_beep(BO_TERM);
return 1;
}