commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamil Páral (JIRA) <>
Subject [jira] Created: (CLI-176) Long descriptions wrap incorrectly
Date Wed, 04 Mar 2009 19:09:56 GMT
Long descriptions wrap incorrectly

                 Key: CLI-176
             Project: Commons CLI
          Issue Type: Bug
          Components: Help formatter
    Affects Versions: 1.1
         Environment: Ubuntu 8.10, Java 6 Update 10.
            Reporter: Kamil Páral
         Attachments: bug.png

When some option has a really long description (at least 3 lines), it wraps incorrectly. See
attached picture, it's a total mess.

The problem is, you have default width set to 74 characters. But when you are printing the
second line of the description, you forget to count also the preceding white space into the
74 characters. Therefore the second line wraps into a third line. After all 74 characters
are printed, you start again on fourth line with a correct preceding white space. And over
and over again.

This fix should be really easy. Just count the whitespace.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message