Skip to content

Commit

Permalink
Merge pull request #18390 from neovim/backport-18382-to-release-0.7
Browse files Browse the repository at this point in the history
[Backport release-0.7] fix(lsp): add missing bufnr argument to util.apply_text_edits
  • Loading branch information
zeertzjq committed May 3, 2022
2 parents a10a904 + d165289 commit 7567d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/lua/vim/lsp/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ function M.apply_text_edits(text_edits, bufnr, offset_encoding)

-- Remove final line if needed
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) == ''
if fix_eol then
vim.api.nvim_buf_set_lines(bufnr, -2, -1, false, {})
Expand Down

0 comments on commit 7567d21

Please sign in to comment.