mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
feat(lsp.util): remove some variables
This commit is contained in:
parent
97119a2369
commit
e954a16063
@ -510,17 +510,12 @@ function M.apply_text_document_edit(text_document_edit, index, offset_encoding)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- For lists of text document edits,
|
|
||||||
-- do not check the version after the first edit.
|
|
||||||
local should_check_version = true
|
|
||||||
if index and index > 1 then
|
|
||||||
should_check_version = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- `VersionedTextDocumentIdentifier`s version may be null
|
-- `VersionedTextDocumentIdentifier`s version may be null
|
||||||
-- https://microsoft.github.io/language-server-protocol/specification#versionedTextDocumentIdentifier
|
-- https://microsoft.github.io/language-server-protocol/specification#versionedTextDocumentIdentifier
|
||||||
if
|
if
|
||||||
should_check_version
|
-- For lists of text document edits,
|
||||||
|
-- do not check the version after the first edit.
|
||||||
|
not (index and index > 1)
|
||||||
and (
|
and (
|
||||||
text_document.version
|
text_document.version
|
||||||
and text_document.version > 0
|
and text_document.version > 0
|
||||||
@ -2179,9 +2174,7 @@ function M._refresh(method, opts)
|
|||||||
|
|
||||||
local textDocument = M.make_text_document_params(bufnr)
|
local textDocument = M.make_text_document_params(bufnr)
|
||||||
|
|
||||||
local only_visible = opts.only_visible or false
|
if opts.only_visible then
|
||||||
|
|
||||||
if only_visible then
|
|
||||||
for _, window in ipairs(api.nvim_list_wins()) do
|
for _, window in ipairs(api.nvim_list_wins()) do
|
||||||
if api.nvim_win_get_buf(window) == bufnr then
|
if api.nvim_win_get_buf(window) == bufnr then
|
||||||
local first = vim.fn.line('w0', window)
|
local first = vim.fn.line('w0', window)
|
||||||
|
Loading…
Reference in New Issue
Block a user