Merge pull request #14268 from erw7/fix-p_ch-problem

screen: fix problem with p_ch
This commit is contained in:
erw7
2021-04-04 12:04:36 +09:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -7508,6 +7508,10 @@ void screen_resize(int width, int height)
Rows = height;
Columns = width;
check_shellsize();
int max_p_ch = Rows - min_rows() + 1;
if (!ui_has(kUIMessages) && p_ch > max_p_ch) {
p_ch = max_p_ch ? max_p_ch : 1;
}
height = Rows;
width = Columns;
p_lines = Rows;