Skip to content
Snippets Groups Projects
Commit 7bbe3f02 authored by Deucе's avatar Deucе :ok_hand_tone4:
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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1714 passed
...@@ -2699,8 +2699,8 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch ...@@ -2699,8 +2699,8 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
height = api->scrn_len - top; height = api->scrn_len - top;
if(!width || (unsigned)width<title_len+6) if(!width || (unsigned)width<title_len+6)
width=title_len+6; width=title_len+6;
if((unsigned)width>api->scrn_width) if((unsigned)(width + left) > api->scrn_width)
width=api->scrn_width; width = api->scrn_width - left + 1;
if(mode&WIN_L2R) if(mode&WIN_L2R)
left=(api->scrn_width-width+2)/2; left=(api->scrn_width-width+2)/2;
else if(mode&WIN_RHT) else if(mode&WIN_RHT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment