Skip to content
Snippets Groups Projects
Commit 3eee47ba authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix off-by-one in delete lines

Previously, delete lines would erase the line above the current one.
This was visible in vim which makes extensive use of delete line
to scroll.
parent 2ba9dc40
No related branches found
No related tags found
No related merge requests found
......@@ -1253,7 +1253,7 @@ dellines(struct cterminal * cterm, int lines)
return;
SCR_XY(&sx, &sy);
MOVETEXT(minx, sy + lines, maxx, maxy, minx, sy);
for(i = TERM_MAXY - lines; i <= TERM_MAXY; i++) {
for(i = TERM_MAXY - lines + 1; i <= TERM_MAXY; i++) {
cterm_gotoxy(cterm, TERM_MINX, i);
cterm_clreol(cterm);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment