Commit 7bbe3f02 authored by Deucе's avatar Deucе 👌🏾
Browse files

Have showbuf() clamp width the same way as height...

Basically, assume left is correct, and calculate the correct width
to fill the screen to the esge.
parent 205b3571
Pipeline #1714 passed with stage
in 10 minutes and 41 seconds
......@@ -2699,8 +2699,8 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
height = api->scrn_len - top;
if(!width || (unsigned)width<title_len+6)
width=title_len+6;
if((unsigned)width>api->scrn_width)
width=api->scrn_width;
if((unsigned)(width + left) > api->scrn_width)
width = api->scrn_width - left + 1;
if(mode&WIN_L2R)
left=(api->scrn_width-width+2)/2;
else if(mode&WIN_RHT)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment