tty: hide cursor unless waiting for user input
Use vi (cursor_invisible) and ve (cursor_normal) to hide and show cursor, if the terminal supports those. This way on a slower connection the cursor doesn't jump all over the place when doing map or menu updates.
This commit is contained in:
@@ -79,7 +79,9 @@ hooked_tty_getlin(
|
||||
for (;;) {
|
||||
(void) fflush(stdout);
|
||||
Strcat(strcat(strcpy(gt.toplines, query), " "), obufp);
|
||||
tty_curs_set(1);
|
||||
c = pgetchar();
|
||||
tty_curs_set(0);
|
||||
if (c == '\033' || c == EOF) {
|
||||
if (c == '\033' && obufp[0] != '\0') {
|
||||
obufp[0] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user