1
0
Fork 0

Merge branch 'folding' into feature

This commit is contained in:
arch1t3cht 2022-08-08 16:40:24 +02:00
commit 80e8ad0103
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ public:
try_parse(parsed[2], &collapsed);
fold.collapsed = !!collapsed;
if (fold.start > 0 && fold.end > fold.start) {
if (fold.start >= 0 && fold.end > fold.start) {
folds.push_back(fold);
}
}

View File

@ -104,7 +104,7 @@ void FoldController::MakeFoldsFromFile() {
int numlines = context->ass->Events.size();
for (LineFold fold : context->ass->Properties.folds) {
if (fold.start > 0 && fold.start < fold.end && fold.end <= numlines) {
if (fold.start >= 0 && fold.start < fold.end && fold.end <= numlines) {
auto opener = std::next(context->ass->Events.begin(), fold.start);
RawAddFold(*opener, *std::next(opener, fold.end - fold.start), fold.collapsed);
}