Files
neovim/runtime/lua
neovim-backports[bot] dc6a9170eb backport: fix(lsp): trailing blank line when edit inserts past end of buffer (#40176)
Problem:
A text edit positioned entirely past the last buffer line, with
newText ending in a newline, leaves a stray blank line: the
past-the-end path appends the trailing empty fragment produced by
vim.split() and does not set has_eol_text_edit, so the end-of-buffer
cleanup is skipped. Formatting servers emit such edits whenever
formatting moves text to the end of a document.

Regression from ec94014cd1 (#20137), which split the past-the-end
fast path off the clamp path that sets the flag.

Solution:
Set has_eol_text_edit in the past-the-end path, like the adjacent
path that clamps end_row.

(cherry picked from commit d42f7ee9dc)

Co-authored-by: Aaron Tinio <aptinio@gmail.com>
2026-06-14 11:25:18 -04:00
..
2026-03-16 10:29:58 +01:00
2025-02-09 18:10:54 +01:00
2026-03-29 13:36:56 +02:00