Repository navigation
Fixes for use with React editor - #235
Conversation
You could * focus replace box and enter replacement * hit enter in replace box to do the replacement * it would focus the find box Frustrating, but fixed.
It was no longer highlighting the current find result
This was broken by the react editor not emitting the dom event for selection changes. refs #232
When you’d split-open a file, the react editor wasn’t attached or rendered yet. So there was no under layer, and when you’d try to request a display update, it would call functions on objects that weren’t there. So I hack this with a delay. This is not a pretty fix. It will all go away when there are marker views in core. refs #232
* open fnr * run a search * split a file * close the split * no more search markers ever! When a pane was destroyed, it would remove the .search-results node with it. This would call the FindResultsView.unsubscribe() fn which would unsubscribe it from all marker changes. refs #232
|
I'd be interested in adding marker highlight decorations now and using those for the React editor rather than the old rendering to just completely work around this problem. I'm reluctant to sink a lot more time into fixing this stuff rather than just fixing the problem once and for all. The only question is how easy it will be to use the different API conditionally while we're supporting both editors. |
|
I'm with you. I actually think it's in a state where we can ship without the marker decoration highlights for now. When we rip the old editor out, we can add the marker decoration highlights. What do you think about that? There is the weird issue in the gif, but I think it's fine for a bit. |
|
I'm somewhat inclined to add the marker view stuff before we flip the switch so package authors have another tool in their arsenal for fixing any breakage they encounter. It sweetens the deal on the switch. |
|
Ah, yeah, that makes sense. I'm going to merge this |
Fixes for use with React editor
There were a number of issues with the react editor. Most of them were related to the marker views.
There is one left, and I cant figure out what is happening:
So all the nodes that need to be in place are there. And by the looks of it nothing changes on those nodes when the cursor moves. Seems like it shows them when
EditorComponent::render()is called. @nathansobo any ideas?I'm ok with marker views sucking a little right now. I'd rather not put any more time into these and instead add them to core and get rid of all this junk.
Fixes #232