edit_status () prints bad status line (fwd)

Pavel Tsekov ptsekov at gmx.net
Tue Nov 9 14:31:34 UTC 2004


Hello,

Please, fix this. Disregard the suggestion at the bottom.

---------- Forwarded message ----------
Date: Fri, 29 Oct 2004 15:46:40 +0200
From: Pavel Tsekov <ptsekov at gmx.net>
To: Roland Illig <roland.illig at gmx.de>
Cc: MC dev <mc-devel at gnome.org>
Subject: edit_status () prints bad status line

Hello,

While working on the editor I noticed that the status line outputs
more characters than the actual number of columns.

    printw ("%-*s", fname_len + gap, fname);
    if (fname_len + gap < w)
        printw ("%-*s  ", w - (fname_len + gap), status);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You should change the line above to:

  printw ("%-*s  ", w - (fname_len + gap + 2), status);


Also, maybe it would be much better to declare a constant like
that:

  static const int right _pad = 2;

and use it to replace all occurences of '2'.




More information about the mc-devel mailing list