Files
Xi Ge 8e28609a31 Fix crashes in code completion for out-of-range positions and at end of file. rdar://194222884
When a request came in with a column past the end of its line, which
happens when the editor's copy of the document has drifted from ours,
LineTable clamped it to the end of the line including its terminator,
which is really the start of the next line. In code completion, if that
next line began with an identifier like `func`, the completion position
landed after the cursor and building the text edit range trapped. LineTable
now clamps such columns to the end of the line's content, before the
newline, as LSP specifies, and completion clamps the request position once
up front so that everything downstream agrees on where the cursor is.

Separately, argument completions at the very end of a file read the
character after the cursor to look for a closing parenthesis, which
subscripted the string at its end index. That check now makes sure there is
a character to look at first.
2026-12-03 16:50:32 -08:00
..
2025-10-31 14:11:11 -07:00