From patchwork Mon Aug 29 23:56:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cheng Renquan X-Patchwork-Id: 1111352 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7TNvvjR026498 for ; Mon, 29 Aug 2011 23:58:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755200Ab1H2X6E (ORCPT ); Mon, 29 Aug 2011 19:58:04 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:34638 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755086Ab1H2X6D (ORCPT ); Mon, 29 Aug 2011 19:58:03 -0400 Received: by mail-gy0-f174.google.com with SMTP id 6so5229544gya.19 for ; Mon, 29 Aug 2011 16:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=9taXuqHFBGhWNgIOulHg2qDQmNttSMIRJf6QpMA5k/w=; b=IHcx4rABzI72aYagPxejHe3xT2VqQZ5Eh5aGalIwznCMkPR589kIWiDJ5O+HyrCdaJ mEEMqOLZYKxl2JghC4vRFxOKlIrCdomcENEcdo3icH7lrvJKT3x69QV5/5ot3FBA7jsR lGJsJU1PVoTKrAmgkeJL+ytfSkihrS5U3VLKI= Received: by 10.42.96.6 with SMTP id h6mr6113870icn.150.1314662283438; Mon, 29 Aug 2011 16:58:03 -0700 (PDT) Received: from localhost.localdomain ([128.107.105.172]) by mx.google.com with ESMTPS id u1sm5993373icj.4.2011.08.29.16.58.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 29 Aug 2011 16:58:02 -0700 (PDT) From: Cheng Renquan To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Michal Marek , Nir Tzachar , Randy Dunlap , c.rq541@comcast.net Subject: [PATCH 5/5] scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox Date: Mon, 29 Aug 2011 16:56:04 -0700 Message-Id: <1314662164-8565-5-git-send-email-crquan@gmail.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1314662164-8565-4-git-send-email-crquan@gmail.com> References: <1314662164-8565-1-git-send-email-crquan@gmail.com> <1314662164-8565-2-git-send-email-crquan@gmail.com> <1314662164-8565-3-git-send-email-crquan@gmail.com> <1314662164-8565-4-git-send-email-crquan@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Aug 2011 23:58:04 +0000 (UTC) to make it better when editing long strings; Signed-off-by: Cheng Renquan --- scripts/kconfig/nconf.gui.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 62a41d1..909c85f 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -468,6 +468,14 @@ int dialog_inputbox(WINDOW *main_window, cursor_form_win--; } break; + case KEY_HOME: + cursor_position = 0; + cursor_form_win = 0; + break; + case KEY_END: + cursor_position = len; + cursor_form_win = min(cursor_position, prompt_width-1); + break; default: if ((isgraph(res) || isspace(res))) { /* one for new char, one for '\0' */