| 76 |
|
|
| 77 |
int press_any_key() |
int press_any_key() |
| 78 |
{ |
{ |
|
igetch(1); |
|
|
|
|
| 79 |
moveto(screen_rows, 0); |
moveto(screen_rows, 0); |
| 80 |
clrtoeol(); |
clrtoeol(); |
| 81 |
|
|
| 112 |
offset++; |
offset++; |
| 113 |
} |
} |
| 114 |
|
|
|
igetch(1); |
|
|
|
|
| 115 |
while (c = igetch_t(60)) |
while (c = igetch_t(60)) |
| 116 |
{ |
{ |
| 117 |
if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) |
if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) |
| 118 |
{ |
{ |
| 119 |
|
igetch(1); // Cleanup remaining '\n' in the buffer |
| 120 |
break; |
break; |
| 121 |
} |
} |
| 122 |
if (c == LF) |
if (c == LF) |
| 300 |
c_line_current -= line; |
c_line_current -= line; |
| 301 |
line = begin_line; |
line = begin_line; |
| 302 |
max_lines = begin_line + 1; |
max_lines = begin_line + 1; |
| 303 |
prints("\033[1T"); // Scroll down 1 line |
prints("\033[T"); // Scroll down 1 line |
| 304 |
|
//max_lines = screen_rows - 1; // Legacy Fterm only works with this line |
| 305 |
break; |
break; |
| 306 |
case KEY_DOWN: |
case KEY_DOWN: |
| 307 |
case CR: |
case CR: |
| 314 |
max_lines = screen_rows - 1; |
max_lines = screen_rows - 1; |
| 315 |
moveto(screen_rows, 0); |
moveto(screen_rows, 0); |
| 316 |
clrtoeol(); |
clrtoeol(); |
| 317 |
prints("\033[1S"); // Scroll up 1 line |
prints("\033[S"); // Scroll up 1 line |
| 318 |
break; |
break; |
| 319 |
case KEY_PGUP: |
case KEY_PGUP: |
| 320 |
case Ctrl('B'): |
case Ctrl('B'): |