nvim-lua / diagnostic-nvim

A wrapper for neovim built in LSP diagnosis config
Apache License 2.0
219 stars 15 forks source link

Ensure that diagnostic character-positions are > 0 (index-out-of-bounds error) #51

Closed el-iot closed 4 years ago

el-iot commented 4 years ago

Some language clients will set the diagnostic.range.start.character = -1 for particular sorts of issues, which causes an "index-out-of-bounds" error when setting virtual text. This fix makes sure all characters start / end positions are are (at least) 0.