From a7554da1c5826c071b50945bbbf2767b532f9acf Mon Sep 17 00:00:00 2001
From: Quaternions <krakow20@gmail.com>
Date: Tue, 12 Sep 2023 18:47:57 -0700
Subject: [PATCH] flush prompt

---
 src/main.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index 42a554f..d88fb7e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -382,10 +382,11 @@ fn interactive() -> Result<(), Box<dyn std::error::Error>>{
                         ScriptAction::Replace(*replace_id)
                     }else{
                         //interactive logic goes here
+                        print!("unresolved source location={}\naction: ",get_full_name(&dom, script));
+                        std::io::Write::flush(&mut std::io::stdout())?;
                         //load source into current.lua
                         std::fs::write("current.lua",source)?;
                         //prompt action in terminal
-                        println!("unresolved source location={}",get_full_name(&dom, script));
                         //wait for input
                         let script_action;
                         loop{