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:
Justin M. Keyes
2016-03-09 09:52:07 -05:00
parent 5fba815921
commit a70fde1b45
18 changed files with 178 additions and 166 deletions

View File

@@ -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,