From patchwork Sun Jun 28 12:04:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 11630077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 644C7138C for ; Sun, 28 Jun 2020 12:05:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F77D207E8 for ; Sun, 28 Jun 2020 12:05:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593345903; bh=eaDjc9XDnzcYv1o13R7slCS+uNfd015+MUC7D5f1QOo=; h=From:To:Cc:Subject:Date:List-ID:From; b=dbDEyNRjfatn0pWOgQZ1Z+YPeh2g7sp+wHfhbcogpNlMCT/rMlqMw3Fh25sjJt3wh x1R25t1vd7QfRdsSzb7RdtQBdF2a1qmhltgLNyw5kT9sHgh0Qm5QJDBszjLFEHw5Rh 2VNjUCVbmh06z2RA2pWo6VzO0g5sBRW/hnwogFXk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbgF1MFB (ORCPT ); Sun, 28 Jun 2020 08:05:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:45434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbgF1MFB (ORCPT ); Sun, 28 Jun 2020 08:05:01 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E464C2076E; Sun, 28 Jun 2020 12:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593345901; bh=eaDjc9XDnzcYv1o13R7slCS+uNfd015+MUC7D5f1QOo=; h=From:To:Cc:Subject:Date:From; b=DTwrA34tymYz5kYhRJOtfRrjzAK8XKlcICw/BXkHoPt9pT1htV65nOuQIHI6Zn1rz Q+07pcJF3SX4Cuw0GaxrWV68P4fl64GqdRTUdnjdRPO7YIqAeUxyMY6eaFp83/lqZv 3nsz2THWUkamBXsDnv0gNr7AZmGraiT0VnF48pLQ= Received: from mchehab by mail.kernel.org with local (Exim 4.93) (envelope-from ) id 1jpW3O-004gV7-Pi; Sun, 28 Jun 2020 14:04:58 +0200 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Levitsky Subject: [PATCH] kconfig: qconf: Fix find on split mode Date: Sun, 28 Jun 2020 14:04:53 +0200 Message-Id: <371f4815f6daac50e90057520d5f2b40a6ca3a74.1593345886.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The logic handling find on split mode is currently broken. Fix it, making it work again as expected. Reported-by: Maxim Levitsky Signed-off-by: Mauro Carvalho Chehab --- scripts/kconfig/qconf.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index c0ac8f7b5f1a..b8f577c6e8aa 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1645,22 +1645,21 @@ void ConfigMainWindow::setMenuLink(struct menu *menu) return; list->setRootMenu(parent); break; - case symbolMode: + case menuMode: if (menu->flags & MENU_ROOT) { - configList->setRootMenu(menu); + menuList->setRootMenu(menu); configList->clearSelection(); - list = menuList; - } else { list = configList; + } else { + configList->setRootMenu(menu); + configList->clearSelection(); + parent = menu_get_parent_menu(menu->parent); if (!parent) return; - item = menuList->findConfigItem(parent); - if (item) { - item->setSelected(true); - menuList->scrollToItem(item); - } - list->setRootMenu(parent); + menuList->setRootMenu(parent); + + list = menuList; } break; case fullMode: