You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Kamil Páral (JIRA)" <ji...@apache.org> on 2009/03/04 20:09:56 UTC
[jira] Created: (CLI-176) Long descriptions wrap incorrectly
Long descriptions wrap incorrectly
----------------------------------
Key: CLI-176
URL: https://issues.apache.org/jira/browse/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.
[jira] Commented: (CLI-176) Long descriptions wrap incorrectly
Posted by "Kamil Páral (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712761#action_12712761 ]
Kamil Páral commented on CLI-176:
---------------------------------
Yes it is now fixed, thank you.
> Long descriptions wrap incorrectly
> ----------------------------------
>
> Key: CLI-176
> URL: https://issues.apache.org/jira/browse/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
> Fix For: 1.2
>
> Attachments: bug.png
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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.
[jira] Updated: (CLI-176) Long descriptions wrap incorrectly
Posted by "Kamil Páral (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kamil Páral updated CLI-176:
----------------------------
Attachment: bug.png
bug demonstation
> Long descriptions wrap incorrectly
> ----------------------------------
>
> Key: CLI-176
> URL: https://issues.apache.org/jira/browse/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
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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.
[jira] Closed: (CLI-176) Long descriptions wrap incorrectly
Posted by "Emmanuel Bourg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLI-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bourg closed CLI-176.
------------------------------
Resolution: Duplicate
Fix Version/s: 1.2
Thank you for the report Kamil. This looks like a duplicate of CLI-151 which was fixed in the latest 1.2 release. Give it a try and let us know if it doesn't work as expected.
> Long descriptions wrap incorrectly
> ----------------------------------
>
> Key: CLI-176
> URL: https://issues.apache.org/jira/browse/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
> Fix For: 1.2
>
> Attachments: bug.png
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> 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.