The branch main has been updated by glebius:

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

commit 96a241a35905078bdc5d20bf25943cdb67758dea
Author:     Maksim Yevmenkin <e...@freebsd.org>
AuthorDate: 2025-06-25 01:13:38 +0000
Commit:     Gleb Smirnoff <gleb...@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 */

Reply via email to