reverse evaluation order so SetFormatting() won't be invoked if findme is empty
This commit is contained in:
@@ -1724,7 +1724,7 @@ int main(int argc, char *argv[])
|
|||||||
ShowMessage("Searching...");
|
ShowMessage("Searching...");
|
||||||
Screen<Scrollpad> *s = static_cast<Screen<Scrollpad> *>(myScreen);
|
Screen<Scrollpad> *s = static_cast<Screen<Scrollpad> *>(myScreen);
|
||||||
s->Main()->RemoveFormatting();
|
s->Main()->RemoveFormatting();
|
||||||
ShowMessage("%s", s->Main()->SetFormatting(fmtReverse, TO_WSTRING(findme), fmtReverseEnd) || findme.empty() ? "Done!" : "No matching patterns found");
|
ShowMessage("%s", findme.empty() || s->Main()->SetFormatting(fmtReverse, TO_WSTRING(findme), fmtReverseEnd) ? "Done!" : "No matching patterns found");
|
||||||
s->Main()->Flush();
|
s->Main()->Flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user