vim-patch:8.1.2293: join adds trailing space when second line is empty

Problem:    Join adds trailing space when second line is empty. (Brennan
            Vincent)
Solution:   Do not add a trailing space.
cc184cfb09
This commit is contained in:
Jan Edmund Lazo
2019-11-12 20:04:15 -05:00
parent 00dc12c5d8
commit 0cb6fc804d
2 changed files with 25 additions and 1 deletions

View File

@@ -3773,7 +3773,10 @@ int do_join(size_t count,
if (insert_space && t > 0) {
curr = skipwhite(curr);
if (*curr != ')' && currsize != 0 && endcurr1 != TAB
if (*curr != NUL
&& *curr != ')'
&& currsize != 0
&& endcurr1 != TAB
&& (!has_format_option(FO_MBYTE_JOIN)
|| (utf_ptr2char(curr) < 0x100 && endcurr1 < 0x100))
&& (!has_format_option(FO_MBYTE_JOIN2)