mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
Utilities: Add fix for 'less' not buffering the correct number of lines
'down_n()' now correctly buffers the needed number of lines, previously there were issues with using it to scroll much more than the existing buffer.
This commit is contained in:
parent
4e4d8d6905
commit
a071dba1ef
1 changed files with 1 additions and 3 deletions
|
@ -141,7 +141,7 @@ public:
|
||||||
{
|
{
|
||||||
clear_status();
|
clear_status();
|
||||||
|
|
||||||
while (n - (m_lines.size() - m_line) > 0) {
|
while (n - (m_lines.size() - m_line) + m_height - 1 > 0) {
|
||||||
if (!read_line())
|
if (!read_line())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -158,8 +158,6 @@ public:
|
||||||
|
|
||||||
void bottom()
|
void bottom()
|
||||||
{
|
{
|
||||||
while (read_line())
|
|
||||||
;
|
|
||||||
down_n(m_lines.size() - m_line);
|
down_n(m_lines.size() - m_line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue