~smlavine/navipage

7399678aa36fa09f3aa8db22c3a64c19dd884bbc — Sebastian LaVine 9 months ago 8037bab
Add cls() calls

These calls are needed, else files with less lines than the amount of
rows in the terminal will display with the lines that were previously on
the terminal (whether previous commands executed, or the contents of a
previous buffer being displayed) still present.
1 files changed, 2 insertions(+), 0 deletions(-)

M main.c
M main.c => main.c +2 -0
@@ 288,6 288,7 @@ change_buffer(const int new)
{
	if (new >= 0 && new < bufl.amt) {
		bufl.n = new;
		cls();
		display_buffer(&bufl.v[bufl.n]);
		return 0;
	}


@@ 909,6 910,7 @@ main(int argc, char *argv[])
	atexit(cleanup_display);

	update_rows();
	cls();
	display_buffer(&bufl.v[bufl.n]);

	input_loop(); /* Doesn't return, but just in case... */