Skip to content

Commit 79840b8

Browse files
authored
Cram into branch condition (#755)
1 parent 72d7cf4 commit 79840b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/document.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,8 @@ struct Document {
507507
if (drawroot->grid && drawroot->grid->folded)
508508
SetSelect(drawroot->parent->grid->FindCell(drawroot));
509509
}
510-
auto diff = (int)drawpath.size() - max(0, len);
511-
if (diff > 0) drawpath.erase(drawpath.begin(), drawpath.begin() + diff);
510+
if (auto diff = (int)drawpath.size() - max(0, len) > 0)
511+
drawpath.erase(drawpath.begin(), drawpath.begin() + diff);
512512
}
513513

514514
void Zoom(int dir, wxDC &dc, bool fromroot = false) {

0 commit comments

Comments
 (0)