fix TextView with escape sequences

This commit is contained in:
rabite 2019-06-17 18:06:45 +02:00
parent 752d6ab8f5
commit 4cc2093cf4
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
use std::io::{BufRead, BufReader};
use crate::files::File;
use crate::term::sized_string;
use crate::term::sized_string_u;
use crate::widget::{Widget, WidgetCore};
use crate::fail::HResult;
use crate::dirty::Dirtyable;
@ -164,7 +164,7 @@ impl Widget for TextView {
"{}{}{}",
crate::term::goto_xy(xpos, i as u16 + ypos),
crate::term::reset(),
sized_string(&line, xsize))
sized_string_u(&line, (xsize-1) as usize))
})
.collect::<String>();
Ok(output)