Closed mauricioszabo closed 6 years ago
Oh wow, this was kinda tricky to figure out. Solved now though :)
I do think this is an Atom core bug though (either implementation or documentation, but most likely the latter). We'll have to see how the TextEditor.onDidChange
behaviour changes (heh) in the future and maybe adjust this code accordingly.
Wow, I must admit that was way faster that I imagined. Thanks! I'm testing it now, but seems its working!
Well, it's better but it's still stealing focus, specially when I use a keystroke to resize splits...
Okay, I don't see any focus stealing when resizing panes with keystrokes at all, so not sure I can do anything about this unless I can reproduce the issue. Is your Atom installation up-to-date?
Yes, my Atom is up to date. I'm using the master branch with proto-repl.
I'll try to reproduce the focus stealing behavior and post here. The problem is that this behavior is somewhat random, so it's kinda hard to find a sequence of keystrokes that cause the problem....
Should be fixed with the new console implementation.
Ok, here's my strange problem...
I think it started happening about a month ago, when I updated Ink. Problem is, somehow ink is stealing focus on my editor. I don't really know why or when exactly this behavior started.
One simple way to reproduce it is to bind the following key:
Then hit a keystroke to start ink console (I use proto-repl, so I hit a keystroke to connect to a remote repl and it opens Ink for me). Then, focus goes to ink console. Then I hit
shift-enter
to go back to my editor.Now, sometimes, when I hit some keystroke to open tree view (or to close it), focus goes to ink console. If I hit a keystroke to resize pane, focus changes to ink. It seems to happen randomly....
Here's a simple video. As you can see, it doesn't seem to follow some kind of logic...
https://drive.google.com/file/d/0BxtWUfDc8tIoeW5iYTRKeXk3Vmc/view
(File is on my google drive because it's too big to be embeded here...)