Use TextEditorElement for VimCommandModeInputView#582
Conversation
There was a problem hiding this comment.
The hidden-input class was a special case in the deprecated TextEditorView. I'm not sure what the equivalent is for TextEditorElement
|
fwiw I have this updated in #545 |
|
@MattKunze the nice thing about this approach is that it uses the newer @tmm1 did you still want to work on this? If not, I can pick it up here. I don't think the If you're not seeing it have any effect, it might already have been broken. |
|
It didn't seem like the optimal approach, I was just following the bouncing balls of documentation regarding upgrading the internal views. |
|
Feel free to pick this up. I noticed the old deprecated class had some special handling for hidden-input, and I wasn't able to make the new view hidden. |
|
I think the motion regression is with handling single-character inputs. The input used to show up, but it was closed after the first character that was typed. That's what hung me up on the other PR was how to handle that with the updated internals. |
In my testing it never used to show up. There's code in the plugin to explicitly hide it in the singleChar case. On this PR, it does show up and it goes away as soon as you type a character. But it's awkward to see it pop up briefly and definitely distracting. |
29462ab to
39939dc
Compare
|
Fixes #544 |
There was a problem hiding this comment.
This doesn't seem to work with addEventListener. Maybe the event needs to be keyup or something different
There was a problem hiding this comment.
Yeah, I can't remember why that doesn't work. Observing text changes on the model seems to work ok though.
Use TextEditorElement for VimCommandModeInputView
|
Thanks @maxbrunsfeld, this is working great now! |
Use TextEditorElement for VimCommandModeInputView
fixes a bug where you're unable to see the text you're typing when hitting
/to searchsearching is working on this PR, but I introduced a regression into Motion.Till where the search input box shows up whereas previously it was invisible
cc @maxbrunsfeld