less: Fix condition to read more data

While mathematically equivalent, the presence of a size_t forces the
comparison to work with size_t's. This means that '-1 < 0' is false,
contrary to the 'mathematically pure' interpretation of the inequality.
This commit is contained in:
Ben Wiederhake 2021-10-31 20:49:13 +01:00 committed by Andreas Kling
parent 5096f9cff5
commit 4e1318fb0e

View file

@ -139,7 +139,7 @@ public:
{
clear_status();
while (n - (m_lines.size() - m_line) + m_height - 1 > 0) {
while (m_lines.size() < m_line + n + m_height - 1) {
if (!read_line())
break;
}