From 5a558038874765f20b9dc1bcb1890600e2a2065d Mon Sep 17 00:00:00 2001
From: Sébastien Dailly <sebastien@dailly.me>
Date: Wed, 11 Dec 2024 22:20:24 +0100
Subject: Correction in the cursor displayed in the console

---
 bin/importer.ml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'bin')

diff --git a/bin/importer.ml b/bin/importer.ml
index f737a46..0d9b751 100644
--- a/bin/importer.ml
+++ b/bin/importer.ml
@@ -300,12 +300,10 @@ let () =
                  db conf.configuration
              with
              | Ok () ->
-                 Printf.printf "%c[?25h%c[1D%c[0K\n%!" (char_of_int 27)
-                   (char_of_int 27) (char_of_int 27);
+                 Helpers.Console.close_cursor ();
                  Ok ()
              | Error e ->
-                 Printf.printf "%c[?25h%c[1D%c[0K\n%!" (char_of_int 27)
-                   (char_of_int 27) (char_of_int 27);
+                 Helpers.Console.close_cursor ();
                  print_endline @@ ImportErrors.repr_error e;
 
                  Ok ()));
-- 
cgit v1.2.3