Skip to content

Commit 885e958

Browse files
committed
fix(util): escape repl buffer name
See #223
1 parent 17a42c6 commit 885e958

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/dapui/util.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local async = require("dapui.async")
33

44
local M = {}
55

6-
local api = vim.api
6+
local api = async.api
77

88
---@return function
99
function M.create_render_loop(render)
@@ -163,10 +163,10 @@ function M.partial(func, ...)
163163
end
164164

165165
function M.send_to_repl(expression)
166-
local repl_win = vim.fn.bufwinid("[dap-repl]")
166+
local repl_win = vim.fn.bufwinid("\\[dap-repl\\]")
167167
if repl_win == -1 then
168168
M.float_element("repl")
169-
repl_win = vim.fn.bufwinid("[dap-repl]")
169+
repl_win = vim.fn.bufwinid("\\[dap-repl\\]")
170170
end
171171
api.nvim_set_current_win(repl_win)
172172
vim.cmd("normal i" .. expression)

0 commit comments

Comments
 (0)