Improved readability of topline state management.

This commit is contained in:
Bart House
2020-10-19 15:19:09 -07:00
parent 3a31587ca9
commit 7795d82be6
4 changed files with 45 additions and 34 deletions
+3 -3
View File
@@ -52,10 +52,10 @@ getlin_hook_proc hook;
struct WinDesc *cw = wins[WIN_MESSAGE];
boolean doprev = 0;
if (ttyDisplay->toplin == 1 && !(cw->flags & WIN_STOP))
if (ttyDisplay->toplin == TOPLINE_NEED_MORE && !(cw->flags & WIN_STOP))
more();
cw->flags &= ~WIN_STOP;
ttyDisplay->toplin = 3; /* special prompt state */
ttyDisplay->toplin = TOPLINE_SPECIAL_PROMPT;
ttyDisplay->inread++;
/* issue the prompt */
@@ -193,7 +193,7 @@ getlin_hook_proc hook;
} else
tty_nhbell();
}
ttyDisplay->toplin = 2; /* nonempty, no --More-- required */
ttyDisplay->toplin = TOPLINE_NON_EMPTY;
ttyDisplay->inread--;
clear_nhwindow(WIN_MESSAGE); /* clean up after ourselves */