Open matze-dd opened 4 years ago
The issue may be solved by the linter component. It should take care that column positions are passed as byte offsets that are expected by Vim function matchaddpos()
(used by ALE for highlighting).
(Not sure whether this issue should be closed.)
In file autoload/ale/handlers/languagetool.vim
, function ale#handlers#languagetool#HandleOutput()
, a field 'vcol'
should be set to 1 in dict l:item
.
Information
VIM version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Mar 18 2020 18:29:15) Inklusive der Patches: 1-1453
VIM - Vi IMproved 8.2 (2019 Dec 12 kompiliert am Mar 30 2020 22:53:24) Inklusive der Patches: 1-486
Operating Systems:
What went wrong
If I use for instance the LanguageTool 'linter' on a plain-text file
then the double trailing dot is correctly highlighted as error location. As soon as I replace 'a' with 'ä', the hightlighting of '..' shifts by one position to the left. This marking of 't.' is not corrected with the next linter run, and immeditiately goes right if I replace the 'ä' with command 'r a'.
Perhaps, the non-ASCII character 'ä' breaks the one-to-one relation between character and byte offsets? As can be seen in the ALEInfo below, LanguageTool correctly reports the error location both for 'a' and 'ä'.
This problem appears whenever a non-ASCII character is present on the same text line at a place before the error highlighting. It disturbs in languages that commonly use such characters, in my case German.
Many thanks for this otherwise fantastic framework!
:ALEInfo