From 1b34c4e8bb39740cbc875c72f35b9ab028317724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Tue, 3 Dec 2024 12:36:00 +0100 Subject: [PATCH] Add `cursor_down` TTY_COMMAND --- include/libdnf5-cli/tty.hpp | 1 + libdnf5-cli/tty.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/include/libdnf5-cli/tty.hpp b/include/libdnf5-cli/tty.hpp index 6db12b0aa..ed39ff271 100644 --- a/include/libdnf5-cli/tty.hpp +++ b/include/libdnf5-cli/tty.hpp @@ -46,6 +46,7 @@ LIBDNF_CLI_API std::ostream & white(std::ostream & stream); LIBDNF_CLI_API std::ostream & clear_line(std::ostream & stream); LIBDNF_CLI_API std::ostream & cursor_up(std::ostream & stream); +LIBDNF_CLI_API std::ostream & cursor_down(std::ostream & stream); LIBDNF_CLI_API std::ostream & cursor_hide(std::ostream & stream); LIBDNF_CLI_API std::ostream & cursor_show(std::ostream & stream); diff --git a/libdnf5-cli/tty.cpp b/libdnf5-cli/tty.cpp index 2eb7688bf..b72761b37 100644 --- a/libdnf5-cli/tty.cpp +++ b/libdnf5-cli/tty.cpp @@ -107,6 +107,9 @@ TTY_COMMAND(clear_line, "\033[2K") // tty::cursor_up TTY_COMMAND(cursor_up, "\x1b[A") +// tty::cursor_down +TTY_COMMAND(cursor_down, "\x1b[B") + // tty::cursor_hide TTY_COMMAND(cursor_hide, "\x1b[?25l")