diff options
author | Gıyaseddin Tanrıkulu <gysddn@gmail.com> | 2020-09-02 06:45:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-01 20:45:47 -0700 |
commit | e86b15b25c70070faf224d97073b6e5c4b032a91 (patch) | |
tree | 0fb2da9da507d22c6d757c3fccf22c279bbb5738 /src/nvim/api/buffer.c | |
parent | a166c2aadbb43f095325637874e7f2a7379d967a (diff) | |
download | rneovim-e86b15b25c70070faf224d97073b6e5c4b032a91.tar.gz rneovim-e86b15b25c70070faf224d97073b6e5c4b032a91.tar.bz2 rneovim-e86b15b25c70070faf224d97073b6e5c4b032a91.zip |
lsp/make_position_param(): handle empty buffer #12825
Fix #12623
problem: nvim_buf_get_lines(0) returns empty during startup, where no buffers are loaded yet.
solution: return empty object
Happens during startup, where buffer may not be loaded yet, because...
`source_startup_scripts()` is done before `edit_buffers()`:
https://github.com/neovim/neovim/blob/9bb552875d205d2f869c66137563f93b77a6d08e/src/nvim/main.c#L362
https://github.com/neovim/neovim/blob/9bb552875d205d2f869c66137563f93b77a6d08e/src/nvim/main.c#L480
Diffstat (limited to 'src/nvim/api/buffer.c')
0 files changed, 0 insertions, 0 deletions