@@ -260,7 +260,7 @@ _dialog_calc_text_size_() {
260260 return
261261 fi
262262 local -i _dcts_tw_
263- _dcts_tw_=" $( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${_dcts_msg_} " ) " 0 0 2> /dev/null | cut -d ' ' -f 2) "
263+ _dcts_tw_=" $( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${_dcts_msg_} " ) " 2> /dev/null | cut -d ' ' -f 2) "
264264 local -i _dcts_titlew_=$(( 3 + 12 + ${# _dcts_title_} + 3 ))
265265 local -i _dcts_reqw_=$(( (_dcts_tw_ + D["TextColsAdjust"]) > _dcts_titlew_ ? (_dcts_tw_ + D["TextColsAdjust"]) : _dcts_titlew_))
266266 _dcts_h_=0
@@ -423,7 +423,7 @@ dialog_menu() {
423423 local -i WindowHeight=0 WindowWidth=0 MenuHeight=0
424424
425425 local -i SubTitleHeight SubTitleWidth
426- read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " 0 0 2> /dev/null | cut -d ' ' -f 1,2 )
426+ read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 2> /dev/null)
427427
428428 if [[ ${Maximized} -eq 1 ]]; then
429429 WindowHeight=${WindowHeightMax}
@@ -492,7 +492,7 @@ dialog_checklist() {
492492 local -i WindowHeight=0 WindowWidth=0 MenuHeight=0
493493
494494 local -i SubTitleHeight SubTitleWidth
495- read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " 0 0 2> /dev/null | cut -d ' ' -f 1,2 )
495+ read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 2> /dev/null)
496496
497497 if [[ ${Maximized} -eq 1 ]]; then
498498 WindowHeight=${WindowHeightMax}
@@ -523,7 +523,7 @@ dialog_checklist() {
523523
524524 if [[ ${WindowHeight} -gt 0 ]]; then
525525 local -i TextRows
526- TextRows=" $( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " " ${WindowHeight} " " ${WindowWidth} " 2> /dev/null | cut -d ' ' -f 1 ) "
526+ TextRows=" $( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 0 " ${WindowWidth} " 2> /dev/null) "
527527 MenuHeight=$(( LINES - D["TextRowsAdjust"] - TextRows))
528528 else
529529 MenuHeight=0
@@ -561,7 +561,7 @@ dialog_radiolist() {
561561 local -i WindowHeight=0 WindowWidth=0 MenuHeight=0
562562
563563 local -i SubTitleHeight SubTitleWidth
564- read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " 0 0 2> /dev/null | cut -d ' ' -f 1,2 )
564+ read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 2> /dev/null)
565565
566566 if [[ ${Maximized} -eq 1 ]]; then
567567 WindowHeight=${WindowHeightMax}
@@ -592,7 +592,7 @@ dialog_radiolist() {
592592
593593 if [[ ${WindowHeight} -gt 0 ]]; then
594594 local -i TextRows
595- TextRows=" $( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " " ${WindowHeight} " " ${WindowWidth} " 2> /dev/null | cut -d ' ' -f 1) "
595+ TextRows=" $( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 0 " ${WindowWidth} " 2> /dev/null | cut -d ' ' -f 1) "
596596 MenuHeight=$(( LINES - D["TextRowsAdjust"] - TextRows))
597597 else
598598 MenuHeight=0
@@ -630,7 +630,7 @@ dialog_inputmenu() {
630630 local -i WindowHeight=0 WindowWidth=0 MenuHeight=0
631631
632632 local -i SubTitleHeight SubTitleWidth
633- read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " 0 0 2> /dev/null | cut -d ' ' -f 1,2 )
633+ read -r SubTitleHeight SubTitleWidth < <( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 2> /dev/null)
634634
635635 if [[ ${Maximized} -eq 1 ]]; then
636636 WindowHeight=${WindowHeightMax}
@@ -661,7 +661,7 @@ dialog_inputmenu() {
661661
662662 if [[ ${WindowHeight} -gt 0 ]]; then
663663 local -i TextRows
664- TextRows=" $( " ${DIALOG} " --output-fd 1 --print-text-size --msgbox " $( strip_styles " ${SubTitle} " ) " " ${WindowHeight} " " ${WindowWidth} " 2> /dev/null | cut -d ' ' -f 1 ) "
664+ TextRows=" $( " ${DIALOG} " --output-fd 1 --print-text-size " $( strip_styles " ${SubTitle} " ) " 0 " ${WindowWidth} " 2> /dev/null) "
665665 MenuHeight=$(( LINES - D["TextRowsAdjust"] - TextRows))
666666 else
667667 MenuHeight=0
0 commit comments