diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-12 20:14:57 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-12 20:14:57 +0200 |
| commit | ecd67870e578c061b06ecc4072477da5e9ea9f52 (patch) | |
| tree | 9565632676b0f2c9b400970b0e9f801648b4c611 /json.lua | |
| parent | 7099e56062861fc8dbb143e78447cce6bf886a97 (diff) | |
| download | vis-lspc-ecd67870e578c061b06ecc4072477da5e9ea9f52.tar.gz vis-lspc-ecd67870e578c061b06ecc4072477da5e9ea9f52.zip | |
fix wandering empty diagnostic highlights
The last commit introduces support for highlighting empty selections
by properly calculating their vis ranges.
However File:content does return an empty string for empty ranges
and we can not check whether the diagnostic still applies to the same
position.
This is fixed by faking a one character range when receiving an
empty one.
Doing so we get a valid one-character content we can compare and
still have proper highlighting because we unconditionally decrement
the range end in highlight_diagnostics.
Fixes: 7099e56062861fc8dbb143e78447cce6bf886a97
Diffstat (limited to 'json.lua')
0 files changed, 0 insertions, 0 deletions
