Skip to content

Commit

Permalink
fix: scrolling incorrect window (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciech-kulik authored May 28, 2024
1 parent 334cf30 commit b726700
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/dapui/elements/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ return function()
})
nio.api.nvim_buf_attach(console_buf, false, {
on_lines = function(_, _, _, _, _, _)
if autoscroll and vim.fn.mode() == "n" then
local active_buf = nio.api.nvim_win_get_buf(0)

if autoscroll and vim.fn.mode() == "n" and active_buf == console_buf then
vim.cmd("normal! G")
end
end,
Expand Down

0 comments on commit b726700

Please sign in to comment.