JunoLab / atom-ink

IDE toolkit for Atom
MIT License
229 stars 40 forks source link

Console focus behaviour change #97

Closed pfitzseb closed 7 years ago

pfitzseb commented 7 years ago

Clicking on the console tab or C-J C-O should always "focus" the last input (in the sense that you can directly start typing), but not scroll there unless you type something in.

See http://discuss.junolab.org/t/some-tips-to-make-users-life-easier/1079/2 for reference.

MikeInnes commented 7 years ago

I agree – I'm not sure if focusing directly will scroll as well, but we could probably get the same effect by focusing on any key press.

pfitzseb commented 7 years ago

It will, we need to remember the current position and scroll back there. Then attach to the input's TextEditor via onDidChange with a _.throttled function or something similar.

MikeInnes commented 7 years ago

That sounds sensible. Editor changes will probably also scroll it into view right? Overriding that will probably be a good idea when there's a multi-line input and things like that though.

pfitzseb commented 7 years ago

No, the editor won't automatically scroll into view when changing it's buffer -- that's why the onDidChange stuff will be necessary. Or did you mean something else?

MikeInnes commented 7 years ago

Yeah that's what I meant. Changes to input text boxes generally have that behaviour but editors don't for some reason.