Skip to content

Commit

Permalink
fix(canvas): render prompt fill in correct buffer
Browse files Browse the repository at this point in the history
See #250
  • Loading branch information
rcarriga committed Jul 14, 2023
1 parent c020f66 commit 85b16ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/dapui/render/canvas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ function Canvas:render_buffer(buffer, action_keys)
self.prompt.callback(value)
end)
if self.prompt.fill then
vim.cmd("normal i" .. self.prompt.fill)
api.nvim_input("A")
api.nvim_buf_set_lines(buffer, -1, -1, true, { "> " .. self.prompt.fill })
if api.nvim_get_current_buf() == buffer then
api.nvim_input("A")
end
end
api.nvim_buf_set_option(buffer, "modified", false)
local group = api.nvim_create_augroup("DAPUIPromptSetUnmodified" .. buffer, {})
Expand Down

0 comments on commit 85b16ac

Please sign in to comment.