mirror of
https://github.com/baoweise-bot/aimili-vpngate.git
synced 2026-09-06 16:16:53 +08:00
fix(cli): block on getch() to avoid background menu refreshing and viewport snapping during scroll
This commit is contained in:
+2
-5
@@ -678,7 +678,7 @@ def main():
|
||||
print_status()
|
||||
print("\n提示: 正在实时监控状态,自动更新。按 Ctrl+C 退出...")
|
||||
last_state = current_state
|
||||
time.sleep(0.5)
|
||||
time.sleep(2.0)
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
elif cmd == "logs":
|
||||
@@ -733,13 +733,10 @@ def main():
|
||||
last_state = current_state
|
||||
|
||||
try:
|
||||
key = getch_timeout(0.5)
|
||||
key = getch()
|
||||
except KeyboardInterrupt:
|
||||
break
|
||||
|
||||
if key is None:
|
||||
continue
|
||||
|
||||
if key == '\x03':
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user