Skip to content

Commit

Permalink
Focus window with breakpoint on stopped event
Browse files Browse the repository at this point in the history
So far it set the cursor, but didn't change the active window.

See #980 (comment)
  • Loading branch information
mfussenegger committed Jul 9, 2023
1 parent bb1ddce commit 3bde6f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/dap/session.lua
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ end
local function set_cursor(win, line, column)
local ok, err = pcall(api.nvim_win_set_cursor, win, { line, column - 1 })
if ok then
api.nvim_set_current_win(win)
api.nvim_win_call(win, function()
api.nvim_command('normal! zv')
end)
Expand Down

0 comments on commit 3bde6f7

Please sign in to comment.