From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 967081381F3 for ; Fri, 20 Sep 2013 08:31:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3437E0BDF; Fri, 20 Sep 2013 08:30:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 133ACE0BDF for ; Fri, 20 Sep 2013 08:30:43 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 18FFB33ED1A for ; Fri, 20 Sep 2013 08:30:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C5C35E546D for ; Fri, 20 Sep 2013 08:30:41 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1379606910.e7f3fbaf986480b070001b07a3897f2d14cfd4d7.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed-curses-types.c X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: e7f3fbaf986480b070001b07a3897f2d14cfd4d7 X-VCS-Branch: master Date: Fri, 20 Sep 2013 08:30:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: be6dcd13-4fd9-4136-91c5-1a48c9da4087 X-Archives-Hash: 2835bdb3fff4b9b35e8861c9f918296d commit: e7f3fbaf986480b070001b07a3897f2d14cfd4d7 Author: Sven Eden gmx net> AuthorDate: Thu Sep 19 16:08:30 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Thu Sep 19 16:08:30 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=e7f3fbaf calculateDescWrap(): Position and length correction now work with reversed pkg/desc order, too. --- ufed-curses-types.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ufed-curses-types.c b/ufed-curses-types.c index 71d751a..fad7b2d 100644 --- a/ufed-curses-types.c +++ b/ufed-curses-types.c @@ -595,13 +595,18 @@ static void calculateDescWrap(sDesc* desc) --left; } - // Correct length if this is the package list + // Correct pos and length if this is the package list // Note: in drawflag() the string is pre- and postfixed with '(' / ')' if (pch == pPkg) { - if (!curr->pos) + // And one to start + if (oLen == curr->pos) ++curr->len; + // Add one to the end if (end >= (wLen - 1)) ++curr->len; + // If this is not the first line, add one to pos: + if (curr->pos && (oLen != curr->pos)) + ++curr->pos; }