mirror of
https://github.com/hrsh7th/nvim-cmp
synced 2024-09-16 20:54:03 +02:00
Fix: Buffer is not 'modifiable' (#1677)
This commit is contained in:
parent
55734c8b70
commit
5e1fa02553
1 changed files with 14 additions and 2 deletions
|
@ -140,7 +140,13 @@ custom_entries_view.open = function(self, offset, entries)
|
|||
end
|
||||
end
|
||||
end
|
||||
vim.api.nvim_buf_set_lines(entries_buf, 0, -1, false, lines)
|
||||
if vim.bo[entries_buf].modifiable == false then
|
||||
vim.bo[entries_buf].modifiable = true
|
||||
vim.api.nvim_buf_set_lines(entries_buf, 0, -1, false, lines)
|
||||
vim.bo[entries_buf].modifiable = false
|
||||
else
|
||||
vim.api.nvim_buf_set_lines(entries_buf, 0, -1, false, lines)
|
||||
end
|
||||
vim.api.nvim_buf_set_option(entries_buf, 'modified', false)
|
||||
|
||||
local width = 0
|
||||
|
@ -264,7 +270,13 @@ custom_entries_view.draw = function(self)
|
|||
table.insert(texts, table.concat(text, ''))
|
||||
end
|
||||
end
|
||||
vim.api.nvim_buf_set_lines(entries_buf, topline, botline, false, texts)
|
||||
if vim.bo[entries_buf].modifiable == false then
|
||||
vim.bo[entries_buf].modifiable = true
|
||||
vim.api.nvim_buf_set_lines(entries_buf, topline, botline, false, texts)
|
||||
vim.bo[entries_buf].modifiable = false
|
||||
else
|
||||
vim.api.nvim_buf_set_lines(entries_buf, topline, botline, false, texts)
|
||||
end
|
||||
vim.api.nvim_buf_set_option(entries_buf, 'modified', false)
|
||||
|
||||
if api.is_cmdline_mode() then
|
||||
|
|
Loading…
Reference in a new issue