[X2Go-Commits] [x2goclient] 01/01: help.cpp: trying to split at hyphens was a bad idea. Remove that part.

git-admin at x2go.org git-admin at x2go.org
Thu Apr 23 00:47:49 CEST 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/help-cmd
in repository x2goclient.

commit e1013d89b0d8d644c350ed2e5ccc9a7fbb4a4fcd
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Apr 23 00:47:01 2015 +0200

    help.cpp: trying to split at hyphens was a bad idea. Remove that part.
---
 debian/changelog |    1 +
 src/help.cpp     |    8 +-------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1a2639b..519281a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -283,6 +283,7 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low
       the help message.
     - help.cpp: add support for newlines within descriptions.
     - help.cpp: use new newline feature for some options.
+    - help.cpp: trying to split at hyphens was a bad idea. Remove that part.
 
   [ Fernando Pedemonte ]
   * New upstream release (4.0.4.0):
diff --git a/src/help.cpp b/src/help.cpp
index 6744f8a..6c91341 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -242,13 +242,7 @@ QString help::pretty_print (help::data_t data) {
           }
           else {
             /* Try to find the next split point. */
-            std::ptrdiff_t split_point_white = working_copy.lastIndexOf (" ", remaining - 1);
-            std::ptrdiff_t split_point_hyphen = working_copy.lastIndexOf ("-", remaining - 1);
-
-            /* Make sure the hyphen is part of the current line. */
-            ++split_point_hyphen;
-
-            std::ptrdiff_t split_point = std::max (split_point_white, split_point_hyphen);
+            std::ptrdiff_t split_point = working_copy.lastIndexOf (" ", remaining - 1);
 
             if (-1 == split_point) {
               /* No split point available. Just print it out and hope for better times... */

--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list