paint bg color when there isn't enough space in a window body for an entire line of text
This commit is contained in:
parent
ccb2aa148e
commit
feb846ddb9
1 changed files with 2 additions and 0 deletions
2
wind.c
2
wind.c
|
@ -219,6 +219,7 @@ int winresize(Window* w, Rectangle r, int safe, int keepextra) {
|
||||||
r1.min.y = y;
|
r1.min.y = y;
|
||||||
if (!safe || !eqrect(w->body.all, r1)) {
|
if (!safe || !eqrect(w->body.all, r1)) {
|
||||||
oy = y;
|
oy = y;
|
||||||
|
|
||||||
if (y + 1 + w->body.fr.font->height <= r.max.y) { /* room for one line */
|
if (y + 1 + w->body.fr.font->height <= r.max.y) { /* room for one line */
|
||||||
r1.min.y = y;
|
r1.min.y = y;
|
||||||
r1.max.y = y + 1;
|
r1.max.y = y + 1;
|
||||||
|
@ -227,6 +228,7 @@ int winresize(Window* w, Rectangle r, int safe, int keepextra) {
|
||||||
r1.min.y = min(y, r.max.y);
|
r1.min.y = min(y, r.max.y);
|
||||||
r1.max.y = r.max.y;
|
r1.max.y = r.max.y;
|
||||||
} else {
|
} else {
|
||||||
|
draw(screen, r1, textcols[BACK], nil, ZP);
|
||||||
r1.min.y = y;
|
r1.min.y = y;
|
||||||
r1.max.y = y;
|
r1.max.y = y;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue