ref(ui): use MAX utility method for code conciseness and clarity

This commit is contained in:
2026-06-20 11:40:57 +03:00
committed by Jabber Developer
parent adb078a3e2
commit 2d3d1ced71

View File

@@ -72,10 +72,7 @@ _win_ensure_pad_capacity(ProfWin* window, WINDOW* win, int lines_needed)
static int
_win_estimated_lines(WINDOW* win, const char* const message, int indent, int pad_indent)
{
int usable = getmaxx(win) - (indent + pad_indent);
if (usable < 1) {
usable = 1;
}
int usable = MAX(1, getmaxx(win) - (indent + pad_indent));
int newlines = 0;
for (const char* p = message; *p; p++) {
if (*p == '\n') {