mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 03:28:33 +00:00
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.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user