lspclient: fix "Line value is out of range" for clangd
Rootcause:
- (last_line_idx + 1, 0) as end position may be invalid for some lsp server
- only onTextChanged will update the info->modified and
info->changes will be ignored if update func is called
before calling onTextChanged
Solution:
- use (last_line_idx, last_line_len) as end position
- update info->modified if add new change to info->changes
Edited by apricity chern
