Mercurial > vim
comparison src/ops.c @ 18599:9cbdd58eeeb2 v8.1.2293
patch 8.1.2293: join adds trailing space when second line is empty
Commit: https://github.com/vim/vim/commit/cc184cfb09161b3bbc7d5d8859a18e812367d19c
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 12 20:31:20 2019 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Nov 2019 20:45:04 +0100 |
parents | 8b0114ffde2b |
children | 788d76db02ac |
comparison
equal
deleted
inserted
replaced
18598:8ad5734bb66b | 18599:9cbdd58eeeb2 |
---|---|
1997 } | 1997 } |
1998 | 1998 |
1999 if (insert_space && t > 0) | 1999 if (insert_space && t > 0) |
2000 { | 2000 { |
2001 curr = skipwhite(curr); | 2001 curr = skipwhite(curr); |
2002 if (*curr != ')' && currsize != 0 && endcurr1 != TAB | 2002 if (*curr != NUL && *curr != ')' |
2003 && currsize != 0 && endcurr1 != TAB | |
2003 && (!has_format_option(FO_MBYTE_JOIN) | 2004 && (!has_format_option(FO_MBYTE_JOIN) |
2004 || (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100)) | 2005 || (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100)) |
2005 && (!has_format_option(FO_MBYTE_JOIN2) | 2006 && (!has_format_option(FO_MBYTE_JOIN2) |
2006 || mb_ptr2char(curr) < 0x100 || endcurr1 < 0x100) | 2007 || mb_ptr2char(curr) < 0x100 || endcurr1 < 0x100) |
2007 ) | 2008 ) |