Line Update #282
-
I'm currently searching the web for a way to "rewrite" or rather update a line I previously out out onto the terminal. If it's the same line it's simply |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello: I am using: static const char MOVE_LEFT[] = "\r";
static const char MOVE_UP[] = "\x1B[1A";
static const char CLEAR_LINE[] = "\x1B[2K";
std::string Screen::ResetPosition(bool clear) {
std::stringstream ss;
if (clear) {
ss << MOVE_LEFT << CLEAR_LINE;
for (int y = 1; y < dimy_; ++y) {
ss << MOVE_UP << CLEAR_LINE;
}
} else {
ss << MOVE_LEFT;
for (int y = 1; y < dimy_; ++y) {
ss << MOVE_UP;
}
}
return ss.str();
} With \x1 being the byte with value 1. More information on the specification: |
Beta Was this translation helpful? Give feedback.
Hello:
I am using:
https://github.com/ArthurSonzogni/FTXUI/blob/master/src/ftxui/screen/screen.cpp
With \x1 being the byte with value 1.
More information on the specification:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-VT52-Mode