Progressing the SWI-Prolog environment

A guess about the highlighting & underscores – is that mixed tabs & spaces in the file? I’ve seen somewhat similar things with the Prolog LSP trying to highlight in a file with tabs…oh, and also windows-style newlines can cause things to get in this weird state too (e.g. this issue addressed with this commit, I think). Jan, is it possible that this issue is causing the built-in editor to get confused? (as I recall, the problem is that the automatic newline translation when reading the file results in the file offsets getting out-of-sync, because when reading CRLF it consumes two characters but since it converts it to a single newline by default, it only counts the offset as increasing by one).