mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-05 08:14:50 +00:00
An LSP server can end a symbol range one line past EOF: the convention for a range covering whole lines ends it at the start of the following, non-existent line. SymbolBody.get_text indexes self._lines[end_line] directly, so that well-defined case raised IndexError. get_text now corrects exactly that case (end_line == len(lines), end_col=0) to end at the actual last line, in get_text itself so it also applies to a cached SymbolBody, not just a freshly constructed one. Any other out-of-range end_line now raises InvalidTextLocationError. Fixes #1498