mirror of
https://github.com/bobwen-dev/hunter
synced 2025-04-12 00:55:41 +02:00
fix TextView with escape sequences
This commit is contained in:
parent
752d6ab8f5
commit
4cc2093cf4
@ -1,7 +1,7 @@
|
|||||||
use std::io::{BufRead, BufReader};
|
use std::io::{BufRead, BufReader};
|
||||||
|
|
||||||
use crate::files::File;
|
use crate::files::File;
|
||||||
use crate::term::sized_string;
|
use crate::term::sized_string_u;
|
||||||
use crate::widget::{Widget, WidgetCore};
|
use crate::widget::{Widget, WidgetCore};
|
||||||
use crate::fail::HResult;
|
use crate::fail::HResult;
|
||||||
use crate::dirty::Dirtyable;
|
use crate::dirty::Dirtyable;
|
||||||
@ -164,7 +164,7 @@ impl Widget for TextView {
|
|||||||
"{}{}{}",
|
"{}{}{}",
|
||||||
crate::term::goto_xy(xpos, i as u16 + ypos),
|
crate::term::goto_xy(xpos, i as u16 + ypos),
|
||||||
crate::term::reset(),
|
crate::term::reset(),
|
||||||
sized_string(&line, xsize))
|
sized_string_u(&line, (xsize-1) as usize))
|
||||||
})
|
})
|
||||||
.collect::<String>();
|
.collect::<String>();
|
||||||
Ok(output)
|
Ok(output)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user