forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: higlight error location in line (hedyorg#1184)
This is a resubmission of hedyorg#1147, which had done most of the heavy lifting to figure out what needed to happen already but had some unnecessary changes in there as well. The `Location` field in the error response already contained both row and column number, so good enough to achieve column-specific highlighting. To support `InvalidCommandException`, which *can* only have a row and not a column (since we don't have that information available), we introduce the convention that `Location` can be either `[row, col]` or just `[row]`. The client will highlight the entire line or just a single character. (I added a helper future-proofed a bit by adding a parameter so that once we want to highlight whole words, we can do that too). There is a bit of a short-term hack in `InvalidCommandException`, which should be tackled as part of addressing hedyorg#1178. Co-authored-by: Felienne <[email protected]>
- Loading branch information
Showing
4 changed files
with
63 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.