mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
Merge pull request #19437 from dundargoc/refactor/char_u-to-char
refactor: replace char_u with char
This commit is contained in:
@@ -1031,7 +1031,7 @@ static int execreg_lastc = NUL;
|
||||
/// with a \. Lines that start with a comment "\ character are ignored.
|
||||
/// @returns the concatenated line. The index of the line that should be
|
||||
/// processed next is returned in idx.
|
||||
static char_u *execreg_line_continuation(char_u **lines, size_t *idx)
|
||||
static char_u *execreg_line_continuation(char **lines, size_t *idx)
|
||||
{
|
||||
size_t i = *idx;
|
||||
assert(i > 0);
|
||||
@@ -1046,7 +1046,7 @@ static char_u *execreg_line_continuation(char_u **lines, size_t *idx)
|
||||
// Any line not starting with \ or "\ is the start of the
|
||||
// command.
|
||||
while (--i > 0) {
|
||||
p = (char_u *)skipwhite((char *)lines[i]);
|
||||
p = (char_u *)skipwhite(lines[i]);
|
||||
if (*p != '\\' && (p[0] != '"' || p[1] != '\\' || p[2] != ' ')) {
|
||||
break;
|
||||
}
|
||||
@@ -1054,9 +1054,9 @@ static char_u *execreg_line_continuation(char_u **lines, size_t *idx)
|
||||
const size_t cmd_start = i;
|
||||
|
||||
// join all the lines
|
||||
ga_concat(&ga, (char *)lines[cmd_start]);
|
||||
ga_concat(&ga, lines[cmd_start]);
|
||||
for (size_t j = cmd_start + 1; j <= cmd_end; j++) {
|
||||
p = (char_u *)skipwhite((char *)lines[j]);
|
||||
p = (char_u *)skipwhite(lines[j]);
|
||||
if (*p == '\\') {
|
||||
// Adjust the growsize to the current length to
|
||||
// speed up concatenating many lines.
|
||||
@@ -1169,7 +1169,7 @@ int do_execreg(int regname, int colon, int addcr, int silent)
|
||||
if (colon && i > 0) {
|
||||
p = (char_u *)skipwhite((char *)str);
|
||||
if (*p == '\\' || (p[0] == '"' && p[1] == '\\' && p[2] == ' ')) {
|
||||
str = execreg_line_continuation((char_u **)reg->y_array, &i);
|
||||
str = execreg_line_continuation(reg->y_array, &i);
|
||||
free_str = true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user