Closed carocad closed 8 years ago
I'm pretty sure that's the cause as well.
On Aug 14, 2016, at 9:51 AM, Camilo Roca notifications@github.com wrote:
see jasongilman/proto-repl#140 This bug was recently found with the new ink console for proto-repl. I was able to reproduce it using the steps described in the original post.
Is this because the input is multi-line?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Yes, the console has to explicitly scroll everything up when there's new input – that logic is here. In principle it's just a case of applying that same logic when input is pasted in and when enter is pressed.
I'm trying to fix this, but the really generic case isn't all that easy -- in principle we want to scroll to the bottom whenever items
changes it's height, e.g. when a Tree
inside a result cell is expanded.
Handling the really general case would be nice but probably isn't as crucial – if you're expanding trees then you probably want to scroll anyway, and it's easier to do because you have your hand on the mouse.
If I have an instance of a console how could I make it scroll to the bottom via a method call? I'm looking for a short term work around.
On Aug 15, 2016, at 5:42 AM, Mike J Innes notifications@github.com wrote:
Handling the really general case would be nice but probably isn't as crucial – if you're expanding trees then you probably want to scroll anyway, and it's easier to do because you have your hand on the mouse.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Haven't tried it, but you should be able to modify the atom.views.getView(console).scrollTop
to your liking – just setting it to infinity or something should do what you want.
@jasongilman I am no longer sure if this is an ink's console bug. If I write a multiline code on the console:
(+
1
1)
and then the console command: evaluate
it correctly scrolls to the bottom.
Nevertheless if I send the same code for evaluation from a clojure editor to the console, then the ink console doesn't automatically scrolls.
That might indicate that the error is on our side but I guess we need more testing for that
I'm pretty sure this is a problem with ink. Can you try the patch in my PR above (which should be strictly better than the current implementation) and see if that fixes it?
see jasongilman/proto-repl#140 This bug was recently found with the new ink console for proto-repl. I was able to reproduce it using the steps described in the original post.
Is this because the input is multi-line?