prevent wrap-around when redrawing console
This commit is contained in:
parent
b956854826
commit
f09085c165
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ void console::operator()()
|
||||||
if (c == 3) // ^c
|
if (c == 3) // ^c
|
||||||
*terminate = true;
|
*terminate = true;
|
||||||
else if (c == 12) { // ^l
|
else if (c == 12) { // ^l
|
||||||
put_string_ll(format("\033[2J"));
|
put_string_ll(format("\033[2J\033[?7l"));
|
||||||
|
|
||||||
fprintf(stderr, "%d %d\n", tx, ty);
|
fprintf(stderr, "%d %d\n", tx, ty);
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ void console::operator()()
|
||||||
put_string_ll(std::string(screen_buffer[row], t_width));
|
put_string_ll(std::string(screen_buffer[row], t_width));
|
||||||
}
|
}
|
||||||
|
|
||||||
put_string_ll(format("\033[%d;%dH", ty + 1, tx + 1));
|
put_string_ll(format("\033[%d;%dH\033[?7h", ty + 1, tx + 1));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
input_buffer.push_back(c);
|
input_buffer.push_back(c);
|
||||||
|
|
Loading…
Add table
Reference in a new issue