lspclient: fix "Line value is out of range" for clangd

Rootcause:

  1. (last_line_idx + 1, 0) as end position may be invalid for some lsp server
  2. only onTextChanged will update the info->modified and
    info->changes will be ignored if update func is called
    before calling onTextChanged

Solution:

  1. use (last_line_idx, last_line_len) as end position
  2. update info->modified if add new change to info->changes

Screenshot_20260111_154540.png

Edited by apricity chern

Merge request reports

Loading