Fix clearing bug
This commit is contained in:
parent
7c77ce4179
commit
174477c756
|
@ -248,6 +248,8 @@ impl Tile {
|
||||||
|
|
||||||
/// Push content into the stdout of the tile.
|
/// Push content into the stdout of the tile.
|
||||||
pub fn push_stdout(&mut self, content: String) {
|
pub fn push_stdout(&mut self, content: String) {
|
||||||
|
eprintln!("{:?}", content);
|
||||||
|
|
||||||
for c in content.chars() {
|
for c in content.chars() {
|
||||||
if c == '\x1b' {
|
if c == '\x1b' {
|
||||||
self.counting = false;
|
self.counting = false;
|
||||||
|
@ -433,9 +435,6 @@ impl Tile {
|
||||||
|
|
||||||
match c {
|
match c {
|
||||||
'\n' => {
|
'\n' => {
|
||||||
line_index += 1;
|
|
||||||
current_char_index = 0;
|
|
||||||
|
|
||||||
let mut spaces = format!(
|
let mut spaces = format!(
|
||||||
"{}",
|
"{}",
|
||||||
cursor::Goto(x + max_char_index, y + line_index as u16 - scroll)
|
cursor::Goto(x + max_char_index, y + line_index as u16 - scroll)
|
||||||
|
@ -445,6 +444,8 @@ impl Tile {
|
||||||
}
|
}
|
||||||
buffer.push(spaces);
|
buffer.push(spaces);
|
||||||
|
|
||||||
|
line_index += 1;
|
||||||
|
current_char_index = 0;
|
||||||
max_char_index = 0;
|
max_char_index = 0;
|
||||||
|
|
||||||
buffer.push(format!(
|
buffer.push(format!(
|
||||||
|
|
Loading…
Reference in New Issue