From c2e9dc2832384587d7ffc08e5c81de673daadde3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 21 Dec 2018 01:34:34 -0500 Subject: [PATCH] Hide the cursor while displaying progress The cursor interferes with our fancy redraw and progress, so hide it while we are doing that. Closes: #2455 Approved by: alexlarsson --- app/flatpak-cli-transaction.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/flatpak-cli-transaction.c b/app/flatpak-cli-transaction.c index e47bdf97..4c9e0d24 100644 --- a/app/flatpak-cli-transaction.c +++ b/app/flatpak-cli-transaction.c @@ -960,7 +960,10 @@ transaction_ready (FlatpakTransaction *transaction) self->table_height += 3; /* 2 for the added lines and one for the newline from the user after the prompt */ if (flatpak_fancy_output ()) - redraw (self); + { + g_print (FLATPAK_ANSI_HIDE_CURSOR); + redraw (self); + } return TRUE; } @@ -1066,6 +1069,9 @@ flatpak_cli_transaction_run (FlatpakTransaction *transaction, res = flatpak_transaction_run (transaction, cancellable, &local_error); + if (flatpak_fancy_output ()) + g_print (FLATPAK_ANSI_SHOW_CURSOR); + if (res && self->n_ops > 0) { const char *text;