Hi,
I am using vue-codemirror6
with custom linter that I wrote, after the linter returns an error I would like to do something in vue-land. for that I am trying to listen to event to see if I have diagnostics.
The problem is that diagnosticCount
is returning zero even If I have diagnostic shown.
I created a reproducer of the show (based on CodeMirror Lint Example source) - cm.html · GitHub
When you open the page:
- You see there is diagnostic error shown and in console
DiagnosticCount 0
- Once I loose focus from the editor I am getting
DiagnosticCount 1
in console. - If I change the regex to be string, the diagnostic disappear (which is expected), but
DiagnosticCount
is still 1.
I tried instead of using EditorState.transactionExtender
to poll (with window.setInterval
) the diagnosticCount
but it’s zero.
Am I doing something wrong here? or this is a bug?