nvim-lua / diagnostic-nvim

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

Fix going out of bounds in a buffer #38

Closed Iron-E closed 4 years ago

Iron-E commented 4 years ago

strict_indexing was set to true in the nvim_buf_get_lines call, so when row got to the end of the buffer it would cause an error.

Setting strict_indexing to false caused line to be nil sometimes, so I added some logic to handle that.

This fixes #36.

haorenW1025 commented 4 years ago

Thanks for the fix:)