*: Partial string handling refactoring

Main points:

- Replace `char_u` with `char` in some cases.
- Remove `str[len] = NUL` hack in some cases when `str` may be considered
  `const`.
This commit is contained in:
ZyX
2016-07-29 21:41:45 +03:00
parent 2a50ff7e2f
commit efa2682e3b
32 changed files with 1289 additions and 1037 deletions

View File

@@ -2512,13 +2512,14 @@ void ex_undolist(exarg_T *eap)
sort_strings((char_u **)ga.ga_data, ga.ga_len);
msg_start();
msg_puts_attr((char_u *)_("number changes when saved"),
hl_attr(HLF_T));
msg_puts_attr(_("number changes when saved"),
hl_attr(HLF_T));
for (int i = 0; i < ga.ga_len && !got_int; ++i) {
msg_putchar('\n');
if (got_int)
if (got_int) {
break;
msg_puts(((char_u **)ga.ga_data)[i]);
}
msg_puts(((const char **)ga.ga_data)[i]);
}
msg_end();