diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:15:05 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-11-25 19:27:38 +0000 |
commit | c5d770d311841ea5230426cc4c868e8db27300a8 (patch) | |
tree | dd21f70127b4b8b5f109baefc8ecc5016f507c91 /src/nvim/terminal.c | |
parent | 9be89f131f87608f224f0ee06d199fcd09d32176 (diff) | |
parent | 081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff) | |
download | rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2 rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 11 |
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; } |