• Benno Schulenberg's avatar
    tweaks: don't optimize for the wrong case · 355a07bb
    Benno Schulenberg authored
    Running strlenpt() on a string that takes up more than 80 columns
    (the width of an average terminal) takes /more/ time than simply
    converting an extra character (the one that will be overwritten
    by the "$" at the edge of the terminal).  So... just convert one
    more character than necessary when the line is overlong.  In the
    most common case, however, the line will fit fully onscreen, and
    we save a whole call of strlenpt().
    355a07bb
winio.c 98.9 KB