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 B66D01389C0 for ; Tue, 12 Feb 2013 09:01:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E773121C084; Tue, 12 Feb 2013 09:01:39 +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 83DBF21C084 for ; Tue, 12 Feb 2013 09:01:39 +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 75BC833E6A8 for ; Tue, 12 Feb 2013 09:01:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id AB236E40A4 for ; Tue, 12 Feb 2013 09:01:19 +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: <1360653530.7cd5b2871ee53ac2c9d1470f95fba7b537ded7c1.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: ufed-curses.c X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 7cd5b2871ee53ac2c9d1470f95fba7b537ded7c1 X-VCS-Branch: master Date: Tue, 12 Feb 2013 09:01:19 +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: 57b295ac-dd52-4634-bb6d-743ec8e077b1 X-Archives-Hash: e6bdff6513d768cb81ad284a775be0d6 commit: 7cd5b2871ee53ac2c9d1470f95fba7b537ded7c1 Author: Sven Eden gmx de> AuthorDate: Tue Feb 12 07:18:50 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Tue Feb 12 07:18:50 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=7cd5b287 Removed the warping of the beginning and end of the list. Further added the missing column separators on blank lines and move the cursor to the display end after drawing the flags. --- ufed-curses.c | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ufed-curses.c b/ufed-curses.c index cd94da9..6d80c8f 100644 --- a/ufed-curses.c +++ b/ufed-curses.c @@ -165,7 +165,9 @@ void drawBottom(bool withSep) void drawFlags() { - int lHeight = wHeight(List); + WINDOW* wLst = win(List); + int lHeight = wHeight(List); + int lWidth = wWidth(List); /* this method must not be called if the current * item is not valid. @@ -220,18 +222,19 @@ void drawFlags() { * flag list, but not the end of the display. */ if(flag == flags) { - int lWidth = wWidth(List); - char buf[lWidth]; - memset(buf, ' ', lWidth); - buf[lWidth] = '\0'; - wmove(win(List), line, 0); - wattrset(win(List), COLOR_PAIR(3)); - while(line++ < lHeight) - waddstr(win(List), buf); + wattrset(wLst, COLOR_PAIR(3)); + while(line < lHeight) { + mvwhline(wLst, line, 0, ' ', lWidth); + mvwaddch(wLst, line, minwidth, ACS_VLINE); // Before state + mvwaddch(wLst, line, minwidth + 4, ACS_VLINE); // Between state and scope + mvwaddch(wLst, line, minwidth + 7, ACS_VLINE); // After scope + ++line; + } } } else dispEnd = flag->listline + flag->ndesc; } + wmove(wLst, lHeight - 1, lWidth - 1); wnoutrefresh(win(List)); } @@ -779,7 +782,7 @@ bool setNextItem(int count, bool strict) return false; } - while (result && (skipped < count)) { + while (result && (skipped < count) && (curr->next != flags)) { lastFlag = curr; lastTop = topline; fHeight = getFlagHeight(curr); @@ -849,7 +852,7 @@ bool setPrevItem(int count, bool strict) return false; } - while (result && (skipped < count)) { + while (result && (skipped < count) && (curr != flags)) { lastFlag = curr; lastTop = topline; curr = curr->prev;