-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong "automatic bracket closing" behaviour? #21
Comments
It's still under testing, but it seems to work in the "Linter and cross binding demo" with the update I just committed. |
Currently, when you input "()", you get "())", which does not follow the specification. https://github.com/logue/vue-codemirror6/blob/master/src/components/CodeMirror.ts#L442 It is necessary to check the update source, If the update comes from CodeMirror, then don't dispatch the update back to CodeMirror. I have fixed it in #22 |
Merged. |
According to the specification (https://codemirror.net/docs/ref/#autocomplete.closeBrackets), the default "automatic bracket closing" should be like this:
(
, then)
is automatically inserted;)
, the cursor moves over that bracket.The example has the same behaviour as explained: https://codemirror.net/try/
It does not seem to work in the same way at https://logue.dev/vue-codemirror6/ with
basic
lang=javascript
.Specifically, the second step, when you type
)
, the character is inserted.The text was updated successfully, but these errors were encountered: