diff --git a/emul_repl.c b/emul_repl.c index 7997412..8503a88 100644 --- a/emul_repl.c +++ b/emul_repl.c @@ -135,9 +135,18 @@ void emul_repl_readline(char input[READ_LINE_MAX]) { int c; int y, x; + int temp_y, temp_x; int index = 0; int history = 0; + getyx(win, y, x); + getmaxyx(win, temp_y, temp_x); + scrollok(win, TRUE); + if (y > temp_y-2) { + scrl(1); + move(y-1, 0); + } + printw(">>"); refresh(); noecho();