remove EMIT_NEWLINE (#1900)

This commit is contained in:
Mark
2023-07-22 21:42:40 -06:00
parent 24450a8827
commit fd7f24e265
3 changed files with 3 additions and 14 deletions

View File

@@ -81,16 +81,8 @@ impl MachineState {
}
static mut PROMPT: bool = false;
static mut EMIT_NEWLINE: bool = false;
const HISTORY_FILE: &'static str = ".scryer_history";
pub(crate) fn set_emit_newline(value: bool) {
unsafe {
EMIT_NEWLINE = value;
}
}
pub(crate) fn set_prompt(value: bool) {
unsafe {
PROMPT = value;
@@ -171,10 +163,8 @@ impl ReadlineStream {
PROMPT = false;
}
if EMIT_NEWLINE {
if self.pending_input.get_ref().get_ref().chars().last() != Some('\n') {
*self.pending_input.get_mut().get_mut() += "\n";
}
if self.pending_input.get_ref().get_ref().chars().last() != Some('\n') {
*self.pending_input.get_mut().get_mut() += "\n";
}
}