~ubuntu-branches/ubuntu/quantal/mutt/quantal-security

« back to all changes in this revision

Viewing changes to muttlib.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-19 10:29:06 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619102906-qw80cgc0ave6ifj8
Tags: 1.5.18-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Build-depend on elinks (elinks doesn't provide links anymore).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1231
1231
          }
1232
1232
          else if (soft && pad < 0)
1233
1233
          {
1234
 
            /* set wptr and wlen back just enough bytes to make sure buf
1235
 
             * fits on screen, \0-terminate dest so mutt_wstr_trunc()
1236
 
             * can correctly compute string's length */
1237
 
            if (pad < -wlen)
1238
 
              pad = -wlen;
 
1234
            /* \0-terminate dest for length computation in mutt_wstr_trunc() */
1239
1235
            *wptr = 0;
1240
 
            wlen = mutt_wstr_trunc (dest, wlen + pad, col + pad, &col);
 
1236
            /* make sure right part is at most as wide as display */
 
1237
            len = mutt_wstr_trunc (buf, destlen, COLS, &wid);
 
1238
            /* truncate left so that right part fits completely in */
 
1239
            wlen = mutt_wstr_trunc (dest, destlen - len, col + pad, &col);
1241
1240
            wptr = dest + wlen;
1242
1241
          }
1243
1242
          if (len + wlen > destlen)