forked from mia/Aegisub
Merge branch 'folding' into feature
This commit is contained in:
commit
80e8ad0103
2 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue