From patchwork Fri Jan 12 05:11:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Mendoza-Jonas X-Patchwork-Id: 859509 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zHrSj4ZCcz9t3G for ; Fri, 12 Jan 2018 16:11:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="cw8p6oqm"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="sOj18W28"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zHrSj25SdzF0mp for ; Fri, 12 Jan 2018 16:11:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="cw8p6oqm"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="sOj18W28"; dkim-atps=neutral X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mendozajonas.com (client-ip=66.111.4.27; helo=out3-smtp.messagingengine.com; envelope-from=sam@mendozajonas.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=mendozajonas.com header.i=@mendozajonas.com header.b="cw8p6oqm"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="sOj18W28"; dkim-atps=neutral Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zHrSZ48p8zF0jX for ; Fri, 12 Jan 2018 16:11:26 +1100 (AEDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id DE79A20B22; Fri, 12 Jan 2018 00:11:23 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 12 Jan 2018 00:11:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= mendozajonas.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=R3+V+2G/Yk+S6xB4f skw2FNqRnt8kwAeoHVaZmEAyfA=; b=cw8p6oqmXALFhwRdPBLWo21JaWXxwq1TM DDUE3POGZV5AxOoosuvSeKWHfrshhiwt6ncDrXuzCkSp7B/vw1ByAx9+BlKG2JXK q4Kjm9l5qQTcQCiFNMJCwZ3gZ51vwe6CJSlsJgdpJ6QXdB5JffMpvsnbeuKcJRGP qYDW+kRJ85ICRQLEq6SAllBQjv0EYKHroShNW4HhjaLilEA2o00ZNFAMWIhgVnb6 kMTQ6MgX3qgEikBj8bMtVIUY2glwtxfJRhF97n28M5iJoNclzgIkXp0Qqrj+x7Ac qm0gkIOBufbWNMCrpSIQ9eZ/wyn4+KdjZUnLjncTXLe7AhA8hoBhA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=R3+V+2G/Yk+S6xB4f skw2FNqRnt8kwAeoHVaZmEAyfA=; b=sOj18W28xuWEo9Gzpl+Do3emVTjZLBBXq kBaRz2OAj5ObyXj8RhGtUiaho2udFRjxaVvqiRKpzSdtO1Z+DTK0FawI4tuoHcD8 yrOEhaaGYkucoD88XVuVxde4/DjgBXNY/h5p2A+O1KHQkFvTze5BFud70QLecScT lK9yPMqPXf2D7zP/Qt+ngd4tvWlnjyi5Qub6Y0KSMYUW16Eq2iEM+ym8fxJbyCau Ob0kCOka2AWxNXm1qgKaMH1768kPlX/sIDfXri1GcKm4SJ3y2wdWV6ruMEcToRJm WcoGl/CbszpyyNKVOTEPKkUBFZR8MZuQu3sM89CRT/uDuke2AiLtg== X-ME-Sender: Received: from v4.ozlabs.ibm.com (unknown [122.99.82.10]) by mail.messagingengine.com (Postfix) with ESMTPA id BFAFA24741; Fri, 12 Jan 2018 00:11:22 -0500 (EST) From: Samuel Mendoza-Jonas To: petitboot@lists.ozlabs.org Subject: [PATCH] ui/ncurses: Clear remaining space when drawing help line Date: Fri, 12 Jan 2018 16:11:14 +1100 Message-Id: <20180112051114.22519-1-sam@mendozajonas.com> X-Mailer: git-send-email 2.15.1 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Mendoza-Jonas MIME-Version: 1.0 Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" When drawing the screen's help line clear each character after the new help line to avoid stale parts of the previous screen's help line remaining on the screen. Signed-off-by: Samuel Mendoza-Jonas --- ui/ncurses/nc-scr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/ncurses/nc-scr.c b/ui/ncurses/nc-scr.c index a02627b..0200d01 100644 --- a/ui/ncurses/nc-scr.c +++ b/ui/ncurses/nc-scr.c @@ -77,6 +77,10 @@ void nc_scr_frame_draw(struct nc_scr *scr) mvwhline(scr->main_ncw, LINES - nc_scr_pos_help_sep, 1, ACS_HLINE, COLS - 2); + if (1 + strlen(scr->frame.help) < COLS) + mvwhline(scr->main_ncw, LINES - nc_scr_pos_help, + 1 + strlen(scr->frame.help), ' ', + COLS - 1 - strlen(scr->frame.help)); mvwaddstr(scr->main_ncw, LINES - nc_scr_pos_help, 1, scr->frame.help); nc_scr_status_draw(scr); }