Skip to content

lsp: Dont discard ranges which meant to encompass the whole document

Waqar Ahmed requested to merge work/lsp-dont-discard-range into master

Some servers e.g., bash-language-server use integer.MAX_VALUE as the end position for a range meaning they want to apply the edit to the whole document. Such ranges are treated as invalid by Kate leading to no action. With this change we adjust such ranges to encompass the whole document properly. This is what VSCode does as well so I think its best we do the same instead of trying to be too pedantic

Merge request reports