Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1681348imm; Sat, 23 Jun 2018 00:02:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJIvBoLFLwTH6tAuggpfRS1dDPdhs8JmniaKAm1I7Z1jW89XwaJHev9Ru5H7FsyDWk727Ae X-Received: by 2002:a63:6e82:: with SMTP id j124-v6mr3947697pgc.349.1529737365284; Sat, 23 Jun 2018 00:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529737365; cv=none; d=google.com; s=arc-20160816; b=uMrGJ2pOD2a6oRr5eAfJwjmquvk72rJ+gZCpvrzGvIj1J8ckIqLx4Xwqw6BydDGZOC Pvkb+ASua16BwXSt6RJ2maiG9gSTd2jdMKRP0SyrS1qwgXX0qyLHc94p9rmAh63SKXL8 YjNYb0v/eza2kagnNuKs6wC2Htdz3q3cViNNOCOZ16VYmWRe3HkrypR8xSVhc/C2yajS drkRwQvYCgNdH/HNEToYJ94FTZ5/U6HQqzE6LojneIeSmNTFqaqnS/SrYz08lK8hyB0u CH85U9Xw2i0+jF4Dd3MMvKkJs4vSvcn0oeizf2QBsUH7t4ydjCoDA15eLA+9tm1RVujV 23VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=goHXMIzgt6qma5wuy+P5rAuYFlC+bbL3wWlksgGn9Hw=; b=phvF9DrGyVqeO5gQGiF5zCA0W4bqiEmYADU2cn2jL6uB/X8JBaYui1OeY/+eR6141C d94yPrWGVWfQLupt1W3aElfxftcSh0sbF2uwAZnqDQXOi94jR6pQj4Dw9NhnQb4IugIo dDAcSs1X7zY415hBXAC/TSARObeNSf5LWepudY3vUHl5tEQl+r3rc29PGXMKbWMWUTj+ 9Dx6J7dGG9FfPkYxNdntXFQQwalBAz6kCMfJlrDEL/TlbS/0rrQTdtI3nMrrEOQWdSoI WH2+CrZS3ZKaIlz2iogXWzN5vY2pUDkkAIiyPOpGByuHcfcF/V5O65R+F+sJ3kITgT9B Eeyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gouders.net header.s=gnet header.b="nD1/KeWD"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20-v6si7542477pga.349.2018.06.23.00.02.16; Sat, 23 Jun 2018 00:02:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gouders.net header.s=gnet header.b="nD1/KeWD"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751498AbeFWHBL (ORCPT + 99 others); Sat, 23 Jun 2018 03:01:11 -0400 Received: from services.gouders.net ([141.101.32.176]:35235 "EHLO services.gouders.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbeFWHBJ (ORCPT ); Sat, 23 Jun 2018 03:01:09 -0400 Received: from lena.gouders.net (ipservice-047-071-023-039.pools.arcor-ip.net [47.71.23.39]) (authenticated bits=0) by services.gouders.net (8.14.8/8.14.8) with ESMTP id w5N6rsuj008735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sat, 23 Jun 2018 08:54:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gouders.net; s=gnet; t=1529736847; bh=Gv6RFv/r9toR/BGyBF0psoXLPV9qsrHMkg8qDEjh7yQ=; h=From:To:Cc:Subject:Date; b=nD1/KeWDq+c6p2Ydk6zmrW1YlFKE4pQfkW9NVBClT7foUXVpNtvDy5cG+H34rdbmx l7e3gQaP1eqgkViPw+uMXbIt+8CH0F7a4pi+fN+bTDSJfe82+IdPR5Ak4+/jUZ0twt RFQMjrEaR76AMrkEA/9NDfIC8KxVisSD6DH5fuQY= From: Dirk Gouders To: Masahiro Yamada , Randy Dunlap , Linux Kbuild mailing list , Linux Kernel Mailing List , Segher Boessenkool , Sam Ravnborg Cc: Dirk Gouders Subject: [RFC v9 0/1] mconf: global i-search in menu prompts Date: Sat, 23 Jun 2018 08:53:46 +0200 Message-Id: <20180623065347.10611-1-dirk@gouders.net> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, v9 of this RFC mainly fixes an issue reported by Randy, I tested this fix a lot and it seems it is ready to send out. Dirk Changes in v9: * Move global variable declarations to lxdialog/dialog.h * Don't do unnecessary initialization of isearch_str. * Fix an issue with '-' and '+' not added to the search pattern. The historical handling of those characters now (again) happens after input has been checked for i-search relevance. * Ensure the unused part of isearch_str is filled with '\0' so there is no need to do string termination each time a character is added. Changes in v8: * Get rid of flat_array and use a short helper function menu_get_next() for tree traversal. * Correct typos reported by Randy Dunlap. Changes in v7: * make menu_isearch() return void * Suggested-by removed, ask for Sam's permission * Rework i-search instructions text * Remember exact starting position in menu * Stay on menu item if it matches pattern with a character added * Fix print_autowrap for short texts * Focus on buttons: use A_STANDOUT for current menu item * Fix compiler warnings * Don't exclude comments in searches * ESC also clears search string * Remove the last parameter of print_isearch and use focus_on_buttons instead * Document changes to print_autowrap and conf() in commit message * Rework comments in the code * Rework commit message, add a motivation part * Free serialized menu array on exit Changes in v6: * The modification of the function print_autowrap() was reworked and is no longer a separate function. * The i-search navigation was completely reworked and now works on the whole menu tree. * Hotkeys are back, because they do not interfere that much with this version of i-search navigation. Changes in v5: * More thoroughly tested code * Hotkey navigation concept completely dropped * Printable characters except special ones form the search string * Focus-sensitive help text above menu * DEL erases search string * Matching string is highlighted in selected menu item * README help text adjusted Changes in v4: * Prototype: consequent i-search navigation concept Changes in v3: * Use current git tree to make the patch apply. * Eliminate debugging output to stderr. Changes in v2: * Additionally to CTRL-s, \ can be used to start isearch. * Raw mode is off by default an can be enabled by an environment variable MENUCONFIG_RAW_MODE. * I also added a variable for toggling raw mode but did not implement anything else. * The isearch indicator is now displayed as soon as isearch is started. * Any key except \, CTRL-s, alphanumeric characters and space terminates isearch and -- except ESC ESC -- is further processed, e.g. ENTER terminates isearch and is then used to navigate into a submenu. * Problems with mismatches and matches above the current position were fixed. Dirk Gouders (1): mconf: global i-search in menu prompts scripts/kconfig/lkc.h | 1 + scripts/kconfig/lxdialog/checklist.c | 2 +- scripts/kconfig/lxdialog/dialog.h | 9 +- scripts/kconfig/lxdialog/inputbox.c | 2 +- scripts/kconfig/lxdialog/menubox.c | 179 ++++++++++++++++++++++++++++++----- scripts/kconfig/lxdialog/util.c | 45 ++++++++- scripts/kconfig/lxdialog/yesno.c | 2 +- scripts/kconfig/mconf.c | 169 +++++++++++++++++++++++++++++++-- scripts/kconfig/menu.c | 28 ++++++ 9 files changed, 398 insertions(+), 39 deletions(-) -- 2.13.6