- Open a file in a tab.
- Split pane.
- New pane will have wrap guides, old pane will lose them.
- Close either pane, it doesn’t matter which, and the wrap guides are now totally gone.
I’ve instrumented my code with a bunch of diagnostic statements to try and figure out what’s going on but it just doesn’t make any sense.
When a new pane is created this is what happens:
- We get an onDidAttach for the editorElement of the old tab (what?) so we showGuides() again for the old tab (should be harmless).
- Then we observe the new text editor and go through the whole creation of MultiWrapGuide (which seems to work b/c the new pane gets the wrap guides just fine).
- Suddenly the wrap guides are gone from the old tab/pane and there’s no getting them back.
Creating and deleting of regular tabs works fine though. It’s just pane splitting and merging that is broken for no obvious reason. I suspect something is going wonky in attaching the the lines element maybe? I’m not sure though because it seems like I’m doing thing pretty much exactly the way that
wrap-guide does things.