Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authorAnatol Pomozov <anatol.pomozov@gmail.com>2020-03-09 11:54:17 -0700
committerAllan McRae <allan@archlinux.org>2020-03-13 11:24:01 +1000
commit87b74fcd8257e3c2fbf2f2949f0561df7517ce71 (patch)
tree2140c27642963ee12c57d238a1a46f4e85de139d /src/pacman/pacman.c
parentddd5b0a462e7beb0e086bb51184934868ded3525 (diff)
Hide cursor while pacman is running
Use ASCII control codes to hide cursor at the pacman start and then show the cursor when pacman finishes. It helps to avoid annoying blinking when progress bars are re-drawn. Cursor is reenabled if pacman expects user's input. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index d58c428a..fefd3fa4 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -300,6 +300,7 @@ static void cleanup(int ret)
/* free memory */
FREELIST(pm_targets);
+ console_cursor_show();
exit(ret);
}
@@ -1084,6 +1085,7 @@ int main(int argc, char *argv[])
int ret = 0;
uid_t myuid = getuid();
+ console_cursor_hide();
install_segv_handler();
/* i18n init */