Merged
Conversation
Member
juliaogris
commented
Mar 29, 2023
- Highlight first, not last error token in line
- Fix empty/delete-all editor bug
Fix empty editor bug, which is caused by the editor module not
responding when its value/content changes to "". "" is falsy - oops.
This was the result of highlighting errors where we'd call
editor.update({errorLines})
without content value. To keep the value for new value being undefined
we changed `this.value = value` to:
this.value = value || this.value
This promptly didn't update for value === "" (falsy) and resulted in the
weird behaviour when emptying the editor. Fixed now with explicit check
again null and undefined.
This had to happen at some point. 🎉
We highlight the offending token with an error message, but due to the limited data structure (don't feel like refactoring now, plus performance is already an issue) - we only allow for one token highlight per error lines. Typically the first error is the most meaningful, whereas later errors are sometimes just follow-ons - so only highlight the first error.
|
firebase-deployment: https://evy-lang--116-9uxno6cz.web.app (ff5595e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.