Any chance we can add a config flag to the
linter so that
openLintPanel(view.current); does not always focus?
We have a use case where the editor needs to re-render on change and we add custom diagnostics on re-run/re-render (not via syntaxTree) and openLintPanel focuses on every change making the experience pretty bad. We can try to re-focus on the editor with the current selection but the assumption that the lint panel should always focus seems questionable no?
What does re-render mean in this case? And are you creating a new editor state in the process?
Using react and setState which re-renders the CM component. The diagnostics are passed in as prop which shows them and shows the panel as well. All fine until the panel is focused on every click. If I can disable that feature and just keep showing it without focusing that would be awesome.
This sounds like you might be manually storing the open state of the search panel somewhere, and restoring it when recreating the component? If so, would it be possible to store the entire
EditorState and reuse that? That should avoid this issue and save you a bunch of code.