Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
F# interactive command history is off by one #4584
I don't see this issue filed elsewhere, but this has been present for a while for me. I'm running VS for Mac on OSX.
In F# interactive, when you press the up-arrow, it wrongly starts at the second to last command you entered instead of the last command. To reproduce:
This actually isn't correct; see these steps instead.
The history is all there -- if you then press the down arrow once, it indeed fills in
So I've been investigating further, and reproduction is actually a little more tricky than I thought. It's only off by one after something happens, and it stays this way for the rest of the session (even after you reset the session). It always seems to involve some amount of sending things to interactive. After some playing around, here's a set of minimum steps that definitely ruin a session:
let f x = printfn "a" printfn "b" printfn "x = %s" x
Also, I've confirmed that this is definitely present in MonoDevelop (not just some kind of weird VS for Mac issue).