mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
fix: output position to col 0
This commit is contained in:
parent
858203ae8d
commit
abff062d90
1 changed files with 1 additions and 4 deletions
|
@ -77,11 +77,8 @@ impl StdinReader {
|
|||
execute!(output, SetCursorStyle::BlinkingBar).unwrap();
|
||||
let mut line = String::new();
|
||||
self.input(&mut line).unwrap();
|
||||
if line.is_empty() {
|
||||
return "".to_string();
|
||||
}
|
||||
disable_raw_mode().unwrap();
|
||||
execute!(output, SetCursorStyle::DefaultUserShape).unwrap();
|
||||
execute!(output, MoveToColumn(0), SetCursorStyle::DefaultUserShape).unwrap();
|
||||
self.lineno += 1;
|
||||
self.buf.push(line);
|
||||
self.buf.last().cloned().unwrap_or_default()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue