mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-28 05:06:56 +02:00
safe subtract in border
This commit is contained in:
parent
1f54140759
commit
3ee25879cd
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ pub trait BorderStyle: Draw<Tui> + Copy {
|
||||||
let area = to.area();
|
let area = to.area();
|
||||||
let style = style.or_else(||self.style_vertical());
|
let style = style.or_else(||self.style_vertical());
|
||||||
let [x, x2, y, y2] = area.lrtb();
|
let [x, x2, y, y2] = area.lrtb();
|
||||||
let h = y2 - y;
|
let h = y2.minus(y);
|
||||||
if h > 1 {
|
if h > 1 {
|
||||||
for y in y..y2.saturating_sub(1) {
|
for y in y..y2.saturating_sub(1) {
|
||||||
to.blit(&Self::W, x, y, style);
|
to.blit(&Self::W, x, y, style);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue