aboutsummaryrefslogtreecommitdiff
path: root/parser_test.lua
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-10-12 20:14:57 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-10-12 20:14:57 +0200
commitecd67870e578c061b06ecc4072477da5e9ea9f52 (patch)
tree9565632676b0f2c9b400970b0e9f801648b4c611 /parser_test.lua
parent7099e56062861fc8dbb143e78447cce6bf886a97 (diff)
downloadvis-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 'parser_test.lua')
0 files changed, 0 insertions, 0 deletions