Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-176

Long descriptions wrap incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.1
    • 1.2
    • Help formatter
    • None
    • Ubuntu 8.10, Java 6 Update 10.

    Description

      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.

      Attachments

        1. bug.png
          120 kB
          Kamil Páral

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kamil.paral Kamil Páral
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Remaining Estimate - 1h
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified