display: fix macro names for ANSI control codes
#define ESC_RESET "\033[0m"
#define ESC_SCROLL_REGION(x, y) "\033[" #x ";" #y "r"
#define ESC_SCROLL_DISABLE "\033[?7h"
-#define ESC_SCROLL_ENABLE "\033[r"
-#define ESC_NAV_VERT(x) "\033[" #x "B"
+#define ESC_SCROLL_RESET "\033[r"
+#define ESC_NAV_DOWN(x) "\033[" #x "B"
+#define ESC_NAV_HORIZ(x) "\033[" #x "G"
#define ESC_RESET_SETTINGS "\033[!p"
/* printf() nonmonetary separator. According to MacOSX's man it's supported there as well */
@@ -269,7 +270,7 @@ static void display_displayLocked(honggfuzz_t* hfuzz) {
display_put("\n---------------------------------- [ " ESC_BOLD "LOGS" ESC_RESET
" ] ------------------/ " ESC_BOLD "%s %s " ESC_RESET "/-",
PROG_NAME, PROG_VERSION);
- display_put(ESC_SCROLL_REGION(13, 999) ESC_NAV(13, 1) ESC_NAV_VERT(500));
+ display_put(ESC_SCROLL_REGION(13, 500) ESC_NAV_HORIZ(1) ESC_NAV_DOWN(500));
}
void display_createTargetStr(honggfuzz_t* hfuzz) {
@@ -303,7 +304,7 @@ void display_display(honggfuzz_t* hfuzz) {
}
void display_fini(void) {
- display_put(ESC_SCROLL_ENABLE ESC_NAV(500, 1));
+ display_put(ESC_SCROLL_RESET ESC_NAV_DOWN(500));
}
void display_init(void) {
