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 068621389C0 for ; Tue, 12 Feb 2013 09:01:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DF7421C07A; Tue, 12 Feb 2013 09:01:30 +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 89C3221C078 for ; Tue, 12 Feb 2013 09:01:24 +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 7782B33E6A9 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 8C892E40A2 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: <1360652035.d0eea64382e8f14897a1b30895eb0a2fa2255f56.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: d0eea64382e8f14897a1b30895eb0a2fa2255f56 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: 39f7903b-3482-4501-815c-0eece57a3277 X-Archives-Hash: a111f2a77dac44b0427b6335e6748cb6 commit: d0eea64382e8f14897a1b30895eb0a2fa2255f56 Author: Sven Eden gmx de> AuthorDate: Tue Feb 12 06:53:55 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Tue Feb 12 06:53:55 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=d0eea643 Fixed a bug that could cause the list to look corrupted if a strong limiting filter (like "masked only") has just been turned off. --- ufed-curses.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ufed-curses.c b/ufed-curses.c index e0eadfd..cd94da9 100644 --- a/ufed-curses.c +++ b/ufed-curses.c @@ -178,7 +178,12 @@ void drawFlags() { sFlag* flag = currentflag; sFlag* last = currentflag; - int line = flag->listline - topline; + /* lHeight - flagHeight are compared against listline - topline, + * because the latter can result in a too large value if a + * strong limiting filter (like "masked") has just been turned + * off. + */ + int line = min(lHeight - getFlagHeight(flag), flag->listline - topline); /* move to the top of the displayed list */ while ((flag != flags) && (line > 0)) {