Skip to content

Commit

Permalink
fix(util): escape repl buffer name
Browse files Browse the repository at this point in the history
See #223
  • Loading branch information
rcarriga committed Jan 31, 2023
1 parent 17a42c6 commit 885e958
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/dapui/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local async = require("dapui.async")

local M = {}

local api = vim.api
local api = async.api

---@return function
function M.create_render_loop(render)
Expand Down Expand Up @@ -163,10 +163,10 @@ function M.partial(func, ...)
end

function M.send_to_repl(expression)
local repl_win = vim.fn.bufwinid("[dap-repl]")
local repl_win = vim.fn.bufwinid("\\[dap-repl\\]")
if repl_win == -1 then
M.float_element("repl")
repl_win = vim.fn.bufwinid("[dap-repl]")
repl_win = vim.fn.bufwinid("\\[dap-repl\\]")
end
api.nvim_set_current_win(repl_win)
vim.cmd("normal i" .. expression)
Expand Down

0 comments on commit 885e958

Please sign in to comment.