On Sat, Dec 13, 2025 at 02:28:41PM -0800, Mike Castle wrote:
> dialog --version
> Version: 1.3-20250817
> 
> The following works as expected:
> dialog --hline 12345678901 --msgbox test 0 0
> 
> The following drops the hline.  That is, the normal graphic line is
> present.  The hline text is one character longer.
> 
> dialog --hline 123456789012 --msgbox test 0 0
> 
> If I add a --title to the widget, and keep making it longer,
> eventually the hline will show up, then make the hline longer and it
> disappears again and so on and so forth.  Or changing the "0 0" to "0
> -1"
> 
> I originally noticed it on a --menu widget, but did not test each one.
> Everything else seems to function correctly.  I was just confused why
> my message was missing (I was using it as sort of a debug/status
> message).
> 
> I could not find this mentioned in the man page.  Nor did I find
> anything in web searches, though granted I did not search too long
> because the terms are pretty generic.
> 
> Did I miss something in the docs?  A bug?  Implementation detail?

This comment in the code should be added to the manpage:
 
 * If we have help-line text, e.g., from "--hline", draw it between the other
 * decorations at the bottom of the dialog window.

That's right before the logic that checks if there's room:

    if (dialog_vars.help_line != NULL
        && dialog_vars.help_line[0] != 0
        && (bottom = getmaxy(win) - 1) > 0) {
        chtype attr = A_NORMAL;
        int cols = dlg_count_columns(dialog_vars.help_line);
        int other = decorations ? (ON_LEFT + ON_RIGHT) : 0;
        int avail = (getmaxx(win) - other - 2);
        int limit = dlg_count_real_columns(dialog_vars.help_line) + 2;

        if (limit < avail) {
            ^^^^^^^^^^^^^

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to