Changeset 6e3b052d in mainline for uspace/lib/clui/tinput.c


Ignore:
Timestamp:
2012-07-30T17:37:22Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
597b12e
Parents:
e1c0260
Message:

Fix computation of column width when showing tab completions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/clui/tinput.c

    re1c0260 r6e3b052d  
    601601       
    602602        unsigned int cols = max(1, (ti->con_cols + 1) / (max_length + 1));
    603         unsigned int col_width = ti->con_cols / cols;
     603        unsigned int padding = ti->con_cols - (cols * max_length) - (cols - 1);
     604        unsigned int col_width = max_length + padding / cols;
    604605        unsigned int rows = cnum / cols + ((cnum % cols) != 0);
    605606       
Note: See TracChangeset for help on using the changeset viewer.