This PR changes calls in some source files from ga_concat() to ga_concat_len() where the length is known.
Cheers
John
https://github.com/vim/vim/pull/19027
(10 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@zeertzjq commented on this pull request.
In src/userfunc.c:
> @@ -1405,7 +1405,7 @@ get_function_body( // For a :def function "python << EOF" concatenates all the lines, // to be used for the instruction later. ga_concat(&heredoc_ga, theline); - ga_concat(&heredoc_ga, (char_u *)"\n"); + ga_concat_len(&heredoc_ga, (char_u *)"\n", 1); // Note: not 1!
?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I don't think these "Note:" lines are necessary. Anyone knows \n is a single character.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I don't think these "Note:" lines are necessary. Anyone knows
\nis a single character.
Yeah, you're probably right. I will remove them.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@basilisk0315 pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra commented on this pull request.
In src/cmdexpand.c:
> @@ -4773,10 +4773,13 @@ copy_substring_from_pos(pos_T *start, pos_T *end, char_u **match,
{
for (lnum = start->lnum + 1; lnum < end->lnum; lnum++)
{
+ size_t linelen;
⬇️ Suggested change
- size_t linelen; + int linelen;
In src/cmdexpand.c:
> line = ml_get(lnum); - if (ga_grow(&ga, ml_get_len(lnum) + 2) != OK) + linelen = ml_get_len(lnum); + if (ga_grow(&ga, linelen + 2) != OK)
this causes compile error on Windows: https://ci.appveyor.com/project/chrisbra/vim/builds/53292699#L76
Probably changing linelen to int should be sufficient.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@basilisk0315 pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@basilisk0315 commented on this pull request.
In src/cmdexpand.c:
> line = ml_get(lnum); - if (ga_grow(&ga, ml_get_len(lnum) + 2) != OK) + linelen = ml_get_len(lnum); + if (ga_grow(&ga, linelen + 2) != OK)
No worries.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()