Use alternate screen buffer in advanced_settings

Added tput smcup and rmcup to advanced_settings to prevent flicker between dialogs. A trap ensures the alternate screen buffer is exited on any return.
This commit is contained in:
CanbiZ 2025-11-27 15:36:14 +01:00
parent f912661ba3
commit 342b7e7e70

View File

@ -1110,6 +1110,12 @@ ensure_global_default_vars_file() {
# - Validates all input and shows current selections # - Validates all input and shows current selections
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
advanced_settings() { advanced_settings() {
# Enter alternate screen buffer to prevent flicker between dialogs
tput smcup 2>/dev/null || true
# Trap to ensure we exit alternate screen on any exit
trap 'tput rmcup 2>/dev/null || true' RETURN
whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58 whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox --title "Here is an instructional tip:" "To make a selection, use the Spacebar." 8 58
# Setting Default Tag for Advanced Settings # Setting Default Tag for Advanced Settings
TAGS="community-script;${var_tags:-}" TAGS="community-script;${var_tags:-}"