diff options
Diffstat (limited to 'src/widget.rs')
-rw-r--r-- | src/widget.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/widget.rs b/src/widget.rs index 87d0b2f..e453679 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -170,10 +170,11 @@ pub trait Widget { fn get_clearlist(&self) -> HResult<String> { let (xpos, ypos) = self.get_coordinates()?.u16position(); let (xsize, ysize) = self.get_coordinates()?.u16size(); + let endpos = ypos + ysize; - Ok((ypos..ysize + 2) - .map(|line| { - format!( + Ok((ypos..endpos) + .map(|line| { + format!( "{}{}{:xsize$}", crate::term::reset(), crate::term::goto_xy(xpos, line), |