From d988559899595eee975d70fb1d0a8ab21d16f6aa Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 22 Sep 2020 12:21:11 +0000 Subject: [PATCH] In the concrete partitions editor, after deleting the last partition move the menu selection to the "add a partition" entry (instead of the sentinel line which is not an active menu entry). --- usr.sbin/sysinst/label.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/sysinst/label.c b/usr.sbin/sysinst/label.c index 659e13958a4d..d990ee92a359 100644 --- a/usr.sbin/sysinst/label.c +++ b/usr.sbin/sysinst/label.c @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.22 2020/09/22 11:44:44 martin Exp $ */ +/* $NetBSD: label.c,v 1.23 2020/09/22 12:21:11 martin Exp $ */ /* * Copyright 1997 Jonathan Stone @@ -36,7 +36,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: label.c,v 1.22 2020/09/22 11:44:44 martin Exp $"); +__RCSID("$NetBSD: label.c,v 1.23 2020/09/22 12:21:11 martin Exp $"); #endif #include @@ -892,6 +892,8 @@ edit_ptn(menudesc *menu, void *arg) sizeof(*menu->opts)*(menu->numopts-edit.index)); menu->numopts--; menu->cursel = 0; + if (pset->parts->num_part == 0) + menu->cursel = 1; /* skip sentinel line */ /* things have changed, re-sort */ pset->num--;