Mercurial > vim
comparison src/ops.c @ 18914:4c0b420e7327 v8.2.0018
patch 8.2.0018: :join does not add white space where it should
Commit: https://github.com/vim/vim/commit/91b65e49440e77222a65b6f868507453239f409b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 17 22:10:58 2019 +0100
patch 8.2.0018: :join does not add white space where it should
Problem: :join does not add white space where it should. (Zdenek Dohnal)
Solution: Handle joining multiple lines propely.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 17 Dec 2019 22:15:04 +0100 |
parents | f9e41ffd3539 |
children | 53088656f5ed |
comparison
equal
deleted
inserted
replaced
18913:35d2ab3c4ff6 | 18914:4c0b420e7327 |
---|---|
1999 | 1999 |
2000 if (insert_space && t > 0) | 2000 if (insert_space && t > 0) |
2001 { | 2001 { |
2002 curr = skipwhite(curr); | 2002 curr = skipwhite(curr); |
2003 if (*curr != NUL && *curr != ')' | 2003 if (*curr != NUL && *curr != ')' |
2004 && currsize != 0 && endcurr1 != TAB | 2004 && sumsize != 0 && endcurr1 != TAB |
2005 && (!has_format_option(FO_MBYTE_JOIN) | 2005 && (!has_format_option(FO_MBYTE_JOIN) |
2006 || (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100)) | 2006 || (mb_ptr2char(curr) < 0x100 && endcurr1 < 0x100)) |
2007 && (!has_format_option(FO_MBYTE_JOIN2) | 2007 && (!has_format_option(FO_MBYTE_JOIN2) |
2008 || mb_ptr2char(curr) < 0x100 || endcurr1 < 0x100) | 2008 || mb_ptr2char(curr) < 0x100 || endcurr1 < 0x100) |
2009 ) | 2009 ) |