mirror of https://github.com/odrling/Aegisub
Fix a case where Recombine Lines would leave an empty line
If a "1, 1+2, 1" pattern appeared at the end of the selection the blank line at the end would never get cleaned up as it's removed when the line after it is checked for recombination, so add a special case for that. Closes #1468. Originally committed to SVN as r6669.
This commit is contained in:
parent
3403734c00
commit
5f00eb62f4
|
@ -109,6 +109,12 @@ void SubtitlesGrid::RecombineLines() {
|
|||
context->ass->Line.remove(d1);
|
||||
continue;
|
||||
}
|
||||
// If d2 is the last line in the selection it'll never hit the above test
|
||||
if (d2 == end && (*d2)->Text.empty()) {
|
||||
delete *d2;
|
||||
context->ass->Line.remove(*d2);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 1, 1+2
|
||||
while (d2 <= end && (*d2)->Text.StartsWith(d1->Text, &(*d2)->Text)) {
|
||||
|
|
Loading…
Reference in New Issue