From patchwork Tue Jul 24 20:12:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Poirier X-Patchwork-Id: 1233021 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D9F3440075 for ; Tue, 24 Jul 2012 20:13:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932103Ab2GXUMd (ORCPT ); Tue, 24 Jul 2012 16:12:33 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:48091 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932098Ab2GXUMb (ORCPT ); Tue, 24 Jul 2012 16:12:31 -0400 Received: by yhmm54 with SMTP id m54so7122370yhm.19 for ; Tue, 24 Jul 2012 13:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=y8GqbcoXl9xg/eUorkWVOYAo6T4OF1a5darj7+Yw218=; b=TrADPiHpuoSQNk4uENf91M2h+SdiVPOWiuoQt8NbyvRsvajXzO5Cts6mHJ7RJjdisT e1X5kKgH4mm4lsaduLeq8eXwfWMhMKwTgqCianmRfRg55sQOmhh5bZwilsXxegUy4qfF P2vA1b02a+sjo2QbRtuTkVzlgf6hQOV0gW5vkhHEh34a0xVM5aYTaejjSKA0lnGtokB1 FX6o+cLy3qc0vlLXHwdVgRDH5wWMHDaDiKEmBDobgoMyZ5Ky5rczJJJNdrQ2F3JJUF/Q c96kNTFOwb6WSkek/DXnuVo0hmhvTFaKZ+sB8HNufAItEn2ollrrMVmox5ff/+rxuc0V jzjA== Received: by 10.43.134.134 with SMTP id ic6mr18185819icc.26.1343160750334; Tue, 24 Jul 2012 13:12:30 -0700 (PDT) Received: from localhost.localdomain (modemcable118.38-22-96.mc.videotron.ca. [96.22.38.118]) by mx.google.com with ESMTPS id dw5sm2805587igc.6.2012.07.24.13.12.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jul 2012 13:12:29 -0700 (PDT) From: Benjamin Poirier To: Michal Marek Cc: Lucas De Marchi , Arnaud Lacombe , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Randy Dunlap Subject: [PATCH v2 2/2] nconf: add u, d command keys in scroll windows Date: Tue, 24 Jul 2012 16:12:03 -0400 Message-Id: <1343160723-14308-2-git-send-email-bpoirier@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1343160723-14308-1-git-send-email-bpoirier@suse.de> References: <500EDDAF.4040506@xenotime.net> <1343160723-14308-1-git-send-email-bpoirier@suse.de> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org They function just like they do in less(1). Also correct some discrepancy between the help text and the code wrt function keys. Signed-off-by: Benjamin Poirier --- scripts/kconfig/nconf.c | 6 +++--- scripts/kconfig/nconf.gui.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 8c0eb65..8087e4d 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -83,10 +83,10 @@ static const char nconf_readme[] = N_( "Text Box (Help Window)\n" "--------\n" "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do for those\n" -" who are familiar with less and lynx.\n" +" keys h,j,k,l function here as do , and for\n" +" those who are familiar with less and lynx.\n" "\n" -"o Press , , , or to exit.\n" +"o Press , , , , or to exit.\n" "\n" "\n" "Alternate Configuration Files\n" diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 3b18dd8..379003c 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -604,9 +604,11 @@ void show_scroll_win(WINDOW *main_window, switch (res) { case KEY_NPAGE: case ' ': + case 'd': start_y += text_lines-2; break; case KEY_PPAGE: + case 'u': start_y -= text_lines+2; break; case KEY_HOME: @@ -632,10 +634,10 @@ void show_scroll_win(WINDOW *main_window, start_x++; break; } - if (res == 10 || res == 27 || res == 'q' - || res == KEY_F(F_BACK) || res == KEY_F(F_EXIT)) { + if (res == 10 || res == 27 || res == 'q' || + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) break; - } if (start_y < 0) start_y = 0; if (start_y >= total_lines-text_lines)