mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 01:21:48 +00:00
Merge pull request #18390 from neovim/backport-18382-to-release-0.7
[Backport release-0.7] fix(lsp): add missing bufnr argument to util.apply_text_edits
This commit is contained in:
@@ -480,7 +480,7 @@ function M.apply_text_edits(text_edits, bufnr, offset_encoding)
|
|||||||
|
|
||||||
-- Remove final line if needed
|
-- Remove final line if needed
|
||||||
local fix_eol = has_eol_text_edit
|
local fix_eol = has_eol_text_edit
|
||||||
fix_eol = fix_eol and (api.nvim_buf_get_option(bufnr, 'eol') or (api.nvim_buf_get_option(bufnr, 'fixeol') and not api.nvim_buf_get_option('binary')))
|
fix_eol = fix_eol and (api.nvim_buf_get_option(bufnr, 'eol') or (api.nvim_buf_get_option(bufnr, 'fixeol') and not api.nvim_buf_get_option(bufnr, 'binary')))
|
||||||
fix_eol = fix_eol and get_line(bufnr, max - 1) == ''
|
fix_eol = fix_eol and get_line(bufnr, max - 1) == ''
|
||||||
if fix_eol then
|
if fix_eol then
|
||||||
vim.api.nvim_buf_set_lines(bufnr, -2, -1, false, {})
|
vim.api.nvim_buf_set_lines(bufnr, -2, -1, false, {})
|
||||||
|
|||||||
Reference in New Issue
Block a user