mirror of
https://github.com/neovim/neovim.git
synced 2026-02-23 10:52:01 +10:00
vim-patch:9.2.0041: Not always using GA_CONCAT_LITERAL
Problem: Not always using GA_CONCAT_LITERAL with string literals.
(after: v9.2.0031)
Solution: Use the GA_CONCAT_LITERAL, instead of ga_concat_len.
(John Marriott)
closes: vim/vim#19468
fc90d8087a
Co-authored-by: John Marriott <basilisk@internode.on.net>
This commit is contained in:
@@ -4059,7 +4059,7 @@ static int copy_substring_from_pos(pos_T *start, pos_T *end, char **match, pos_T
|
||||
ga_concat_len(&ga, start_ptr, (size_t)segment_len);
|
||||
if (!is_single_line) {
|
||||
if (exacttext) {
|
||||
ga_concat_len(&ga, S_LEN("\\n"));
|
||||
GA_CONCAT_LITERAL(&ga, "\\n");
|
||||
} else {
|
||||
ga_append(&ga, '\n');
|
||||
}
|
||||
@@ -4073,7 +4073,7 @@ static int copy_substring_from_pos(pos_T *start, pos_T *end, char **match, pos_T
|
||||
ga_grow(&ga, linelen + 2);
|
||||
ga_concat_len(&ga, line, (size_t)linelen);
|
||||
if (exacttext) {
|
||||
ga_concat_len(&ga, S_LEN("\\n"));
|
||||
GA_CONCAT_LITERAL(&ga, "\\n");
|
||||
} else {
|
||||
ga_append(&ga, '\n');
|
||||
}
|
||||
|
||||
@@ -3202,7 +3202,7 @@ char *getcmdkeycmd(int promptc, void *cookie, int indent, bool do_concat)
|
||||
emsg(_(e_cmd_mapping_must_end_with_cr_before_second_cmd));
|
||||
aborted = true;
|
||||
} else if (c1 == K_SNR) {
|
||||
ga_concat_len(&line_ga, S_LEN("<SNR>"));
|
||||
GA_CONCAT_LITERAL(&line_ga, "<SNR>");
|
||||
} else {
|
||||
if (cmod != 0) {
|
||||
ga_append(&line_ga, K_SPECIAL);
|
||||
|
||||
@@ -11587,9 +11587,9 @@ static void nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent)
|
||||
// grow indent for state->out
|
||||
indent->ga_len -= 1;
|
||||
if (state->out1) {
|
||||
ga_concat(indent, S_LEN("| "));
|
||||
GA_CONCAT_LITERAL(indent, "| ");
|
||||
} else {
|
||||
ga_concat(indent, S_LEN(" "));
|
||||
GA_CONCAT_LITERAL(indent, " ");
|
||||
}
|
||||
ga_append(indent, NUL);
|
||||
|
||||
@@ -11597,7 +11597,7 @@ static void nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent)
|
||||
|
||||
// replace last part of indent for state->out1
|
||||
indent->ga_len -= 3;
|
||||
ga_concat(indent, S_LEN(" "));
|
||||
GA_CONCAT_LITERAL(indent, " ");
|
||||
ga_append(indent, NUL);
|
||||
|
||||
nfa_print_state2(debugf, state->out1, indent);
|
||||
|
||||
@@ -224,7 +224,7 @@ char *estack_sfile(estack_arg_T which)
|
||||
"[%" PRIdLINENR "]", lnum);
|
||||
}
|
||||
if (idx != exestack.ga_len - 1) {
|
||||
ga_concat_len(&ga, S_LEN(".."));
|
||||
GA_CONCAT_LITERAL(&ga, "..");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user