]> Kevux Git Server - fll/commitdiff
Update: Only print final new line on interrupt.
authorKevin Day <Kevin@kevux.org>
Sun, 8 Dec 2024 19:38:16 +0000 (13:38 -0600)
committerKevin Day <Kevin@kevux.org>
Sun, 8 Dec 2024 19:39:19 +0000 (13:39 -0600)
The behavior of adding the trailing new line is a bit problematic.
Remove the extra line, except for when an interrupt is triggered.

level_3/iki_read/c/iki_read.c

index 25235f843f7b31f5cd4880ac4171f366a89672c8..8cd92d06a97781ded90e0f861e64a3aac40c6bfb 100644 (file)
@@ -580,13 +580,13 @@ extern "C" {
       status = F_status_set_error(F_parameter);
     }
 
-    // Ensure a new line is always put at the end of the program execution, unless in quiet mode.
+    // Ensure a new line is always put at the end of the program execution on interrupt, unless in quiet mode.
     if (main->output.verbosity != f_console_verbosity_quiet_e) {
       if (F_status_set_fine(status) == F_interrupt) {
         fflush(main->output.to.stream);
-      }
 
-      fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
+        fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
+      }
     }
 
     iki_read_data_delete(&data);