mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 12:00:33 +03:00
change the dialog refresh workaround function so it simply sets TERM=xterm-color, which seems to fix most issues; any other issues will go in a yet to be created doc KNOWN_ISSUES; thanks to Mauro for this fix
This commit is contained in:
parent
39ce2083f4
commit
9f9ec7a6a9
@ -40,24 +40,11 @@
|
|||||||
dialog_refresh_workaround() {
|
dialog_refresh_workaround() {
|
||||||
# Dialog has refresh problems on some terminals (currently known are some
|
# Dialog has refresh problems on some terminals (currently known are some
|
||||||
# rxvt-based terminals and screen sessions), preventing correct dialogs
|
# rxvt-based terminals and screen sessions), preventing correct dialogs
|
||||||
# rendering. This function enables a workaround, consisting of a
|
# rendering.
|
||||||
# background task sending SIGWINCH to any new dialog instance. Despite
|
# It turns out that forcing TERM=xterm-color "fixes" at least most of the
|
||||||
# being probably harmless on "good" terminals, this function should really
|
# issues, so work around them this way.
|
||||||
# be called only on problematic ones.
|
|
||||||
|
|
||||||
DIALOG_REFRESH_WORKAROUND_SBOPKG_PID=$$
|
export TERM=xterm-color
|
||||||
|
|
||||||
( # The background task runs in a separate shell
|
|
||||||
OLDDIALOGS=
|
|
||||||
while [[ $(ps h --pid $DIALOG_REFRESH_WORKAROUND_SBOPKG_PID) ]]; do
|
|
||||||
DIALOGS=$(pgrep -x "^dialog$")
|
|
||||||
if [[ "$DIALOGS" != "$OLDDIALOGS" ]]; then
|
|
||||||
[[ "$DIALOGS" ]] && kill -WINCH $DIALOGS
|
|
||||||
OLDDIALOGS="$DIALOGS"
|
|
||||||
fi
|
|
||||||
sleep 0.3
|
|
||||||
done
|
|
||||||
) &
|
|
||||||
}
|
}
|
||||||
|
|
||||||
crunch() {
|
crunch() {
|
||||||
|
Loading…
Reference in New Issue
Block a user