Skip to content

Commit

Permalink
Only activate repl auto scroll on 0G or G
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Jan 13, 2024
1 parent aad4627 commit 9adbfdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/dap/repl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ local function new_buf()
vim.fn.prompt_setcallback(buf, execute)
if vim.fn.has('nvim-0.7') == 1 then
vim.keymap.set('n', 'G', function()
autoscroll = true
autoscroll = vim.v.count == 0
vim.cmd(string.format('normal! %dG', vim.v.count))
end, { silent = true, buffer = buf })
api.nvim_create_autocmd({'InsertEnter', 'CursorMoved'}, {
Expand Down

0 comments on commit 9adbfdc

Please sign in to comment.