From 96a241a35905078bdc5d20bf25943cdb67758dea Mon Sep 17 00:00:00 2001 From: Maksim Yevmenkin Date: Tue, 24 Jun 2025 18:13:38 -0700 Subject: [PATCH] bsddialog: in textbox mode differentiate between Exit and Extra buttons If run --extra-button --textbox dialog will have two buttons, but either of them would return 0 exit status. We definitely want the Extra to report its value. Reviewed by: jlduran, asiciliano Differential Revision: https://reviews.freebsd.org/D48668 --- contrib/bsddialog/lib/textbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/bsddialog/lib/textbox.c b/contrib/bsddialog/lib/textbox.c index 597dc6c8187..ca3eb69fff5 100644 --- a/contrib/bsddialog/lib/textbox.c +++ b/contrib/bsddialog/lib/textbox.c @@ -200,7 +200,7 @@ bsddialog_textbox(struct bsddialog_conf *conf, const char *file, int rows, switch(input) { case KEY_ENTER: case 10: /* Enter */ - retval = BSDDIALOG_OK; + retval = BUTTONVALUE(d.bs); loop = false; break; case 27: /* Esc */