From a70fde1b45859bbe557261493bfff40aa90d469a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 9 Mar 2016 09:52:07 -0500 Subject: build: enable -Wshadow Note about shada.c: - shada_read_next_item_start was intentionally shadowing `unpacked` and `i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly depended on those variable names. - Macros were changed to parameterize `unpacked` (but not `i`). Macros like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other approach is messy. --- src/nvim/terminal.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/nvim/terminal.c') diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index f715344689..51bf22b31c 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -529,6 +529,20 @@ void terminal_send(Terminal *term, char *data, size_t size) term->opts.write_cb(data, size, term->opts.data); } +void terminal_paste(long count, char_u **y_array, size_t y_size) +{ + for (int i = 0; i < count; i++) { // -V756 + // feed the lines to the terminal + for (size_t j = 0; j < y_size; j++) { + if (j) { + // terminate the previous line + terminal_send(curbuf->terminal, "\n", 1); + } + terminal_send(curbuf->terminal, (char *)y_array[j], STRLEN(y_array[j])); + } + } +} + void terminal_flush_output(Terminal *term) { size_t len = vterm_output_read(term->vt, term->textbuf, -- cgit