public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulius Zaleckas <paulius.zaleckas@gmail.com>
To: mmarek@suse.cz, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] menuconfig: add Home and End keys support for inputbox
Date: Mon, 09 Jan 2012 13:36:41 +0200	[thread overview]
Message-ID: <20120109113641.24486.95511.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20120109113633.24486.69758.stgit@localhost6.localdomain6>

Makes long string editing easier.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
---

 scripts/kconfig/lxdialog/inputbox.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index 834eee9..0d9cacc 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -158,6 +158,16 @@ do_resize:
 					goto redraw;
 				}
 				continue;
+			case KEY_HOME:
+				scroll = input_x = 0;
+				goto redraw;
+			case KEY_END:
+				if (len >= box_width) {
+					scroll = len - box_width + 1;
+					input_x = box_width - 1;
+				} else
+					input_x = len;
+				goto redraw;
 			default:
 				if (key < 0x100 && isprint(key)) {
 					if (len < MAX_LEN) {


  reply	other threads:[~2012-01-09 11:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 11:36 [PATCH v2 1/2] menuconfig: basic string editing in inputbox support Paulius Zaleckas
2012-01-09 11:36 ` Paulius Zaleckas [this message]
2012-01-09 22:20   ` [PATCH v2 2/2] menuconfig: add Home and End keys support for inputbox Randy Dunlap
2012-01-10 11:50     ` Paulius Zaleckas
2012-01-10 17:30       ` Randy Dunlap
2012-01-11  9:21         ` Paulius Zaleckas
2012-01-11 19:12           ` Randy Dunlap
2012-01-12 14:24             ` Paulius Zaleckas
2012-01-12 17:40               ` Randy Dunlap
2012-01-13 15:35                 ` Paulius Zaleckas
2012-01-13 17:48                   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120109113641.24486.95511.stgit@localhost6.localdomain6 \
    --to=paulius.zaleckas@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox