mirror of https://github.com/bobwen-dev/hunter
fix TextView with escape sequences
This commit is contained in:
parent
752d6ab8f5
commit
4cc2093cf4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue