Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2025 01:14:35 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 96a241a35905 - main - bsddialog: in textbox mode differentiate between Exit and Extra buttons
Message-ID:  <202506250114.55P1EZr2056002@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=96a241a35905078bdc5d20bf25943cdb67758dea

commit 96a241a35905078bdc5d20bf25943cdb67758dea
Author:     Maksim Yevmenkin <emax@FreeBSD.org>
AuthorDate: 2025-06-25 01:13:38 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-06-25 01:13:38 +0000

    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 597dc6c8187b..ca3eb69fff52 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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506250114.55P1EZr2056002>