mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
fix: show last error
This commit is contained in:
parent
556ce8e6aa
commit
35602e655e
1 changed files with 7 additions and 1 deletions
|
@ -300,7 +300,13 @@ impl Input {
|
|||
.iter()
|
||||
.map(|s| s.to_string())
|
||||
.collect(),
|
||||
Self::REPL(_) => GLOBAL_STDIN.reread_lines(ln_begin, ln_end),
|
||||
Self::REPL(_) => {
|
||||
if ln_begin == ln_end {
|
||||
vec![GLOBAL_STDIN.reread()]
|
||||
} else {
|
||||
GLOBAL_STDIN.reread_lines(ln_begin, ln_end)
|
||||
}
|
||||
}
|
||||
Self::DummyREPL(dummy) => dummy.reread_lines(ln_begin, ln_end),
|
||||
Self::Dummy => panic!("cannot read lines from a dummy file"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue