Skip to content

Commit

Permalink
fix(popup): set modifiable failed when vim.api.nvim_buf_set_lines (
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroSuero committed Apr 25, 2024
1 parent 5129a36 commit 08e3019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions lua/plenary/popup/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ function popup.create(what, vim_options)
assert(bufnr, "Failed to create buffer")

vim.api.nvim_buf_set_option(bufnr, "bufhidden", "wipe")
if vim.o.modifiable == false then
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)
end
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)

-- TODO: Handle list of lines
if type(what) == "string" then
Expand Down
1 change: 1 addition & 0 deletions lua/plenary/window/border.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ function Border:__align_calc_config(content_win_options, border_win_options)
-- Update border characters and title_ranges
self.contents, self.title_ranges = Border._create_lines(self.content_win_id, content_win_options, border_win_options)

vim.api.nvim_buf_set_option(self.bufnr, "modifiable", true)
vim.api.nvim_buf_set_lines(self.bufnr, 0, -1, false, self.contents)

local thickness = border_win_options.border_thickness
Expand Down

0 comments on commit 08e3019

Please sign in to comment.