File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 9
9
TITLE=" ------------------------------- MySQL Monitor (Press 'q' to exit) -------------------"
10
10
11
11
# Define minimum terminal size requirements
12
- MIN_COLS=88 # Minimum number of columns
13
- MIN_ROWS=50 # Minimum number of rows
12
+ MIN_COLS=50 # Minimum number of columns
13
+ MIN_ROWS=45 # Minimum number of rows
14
14
15
15
# Check for required tools
16
16
for tool in mysqladmin awk; do
@@ -73,8 +73,10 @@ tput smcup 2>/dev/null || true
73
73
74
74
# Handle CTRL+C and other term signals to restore screen and cursor before exit.
75
75
cleanup () {
76
- printf ' \033[?25h' # Show the cursor
77
- tput rmcup 2> /dev/null || true
76
+ # Re-enable line wrapping
77
+ printf " \033[?7h"
78
+ printf ' \033[?25h'
79
+ tput rmcup 2> /dev/null || true
78
80
echo -e " \nExiting MySQL Monitor. Goodbye!"
79
81
exit
80
82
}
@@ -87,6 +89,10 @@ printf '\033[?25l'
87
89
# Clear the screen once before starting the loop
88
90
printf " \033[H\033[J"
89
91
92
+ # ---------------- NEW: Disable wrapping here ----------------
93
+ printf " \033[?7l"
94
+ # -----------------------------------------------------------
95
+
90
96
while true ; do
91
97
92
98
# Read current terminal size
You can’t perform that action at this time.
0 commit comments