Skip to content

Commit

Permalink
feat: move hunk preview window while scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
ooesili authored and lewis6991 committed Jan 3, 2023
1 parent 2ab3bdf commit 615f256
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/gitsigns/popup.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions teal/gitsigns/popup.tl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ function popup.create0(lines: {string}, opts: {string:any}, id: string): integer
end
})

-- update window position to follow the cursor when scrolling
api.nvim_create_autocmd({'WinScrolled'}, {
group = group,
callback = function()
api.nvim_win_set_config(winid, opts1)
end
})

return winid, bufnr
end

Expand Down

0 comments on commit 615f256

Please sign in to comment.