Fix invalid line joining logic with multiple selection per line

Fixes #4476
This commit is contained in:
Maxime Coste 2021-12-20 09:13:53 +11:00
parent 92f7306d5b
commit f68e8313b2
4 changed files with 5 additions and 0 deletions

View File

@ -1104,6 +1104,7 @@ void join_lines_select_spaces(Context& context, NormalParams)
if (selections.empty())
return;
context.selections_write_only() = std::move(selections);
context.selections().merge_consecutive();
ScopedEdition edition(context);
context.selections().replace({" "_str});
}

View File

@ -0,0 +1 @@
%<a-s><a-S><a-j>

View File

@ -0,0 +1,2 @@
ab
ac

View File

@ -0,0 +1 @@
ab ac