Skip to content

Commit 3d0d731

Browse files
committed
Inline with_win
1 parent dcb8c8c commit 3d0d731

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

lua/dap/session.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,20 +383,13 @@ function Session:_show_exception_info(thread_id)
383383
end
384384

385385

386-
local function with_win(win, fn, ...)
387-
local args = {...}
388-
local ok, err
389-
api.nvim_win_call(win, function()
390-
ok, err = pcall(fn, unpack(args))
391-
end)
392-
assert(ok, err)
393-
end
394-
395386

396387
local function set_cursor(win, line, column)
397388
local ok, err = pcall(api.nvim_win_set_cursor, win, { line, column - 1 })
398389
if ok then
399-
with_win(win, api.nvim_command, 'normal! zv')
390+
api.nvim_win_call(win, function()
391+
api.nvim_command('normal! zv')
392+
end)
400393
else
401394
local msg = string.format(
402395
"Debug adapter reported a frame at line %s column %s, but: %s. "

0 commit comments

Comments
 (0)