kurtlawrence/papyrus

println!() does not carriage return on linux

Closed this issue · 1 comments

Running the following. Does not carriage return with the println!(). Behaviour does not replicate on windows.

[lib] papyrus=> for i in 0..10 { println!("{}", i); }
0
 1
  2
   3
    4
     5
      6
       7
        8
         9
papyrus [out0]: ()

The behaviour can be rectified by disabling raw mode (https://docs.rs/crossterm/0.14.1/crossterm/terminal/fn.disable_raw_mode.html), running the evalution, then re-enabling raw mode (https://docs.rs/crossterm/0.14.1/crossterm/terminal/fn.enable_raw_mode.html).

There is also a small issue with linux printing/not erasing last line when a read line overflows which can be fixed on this commit