Skip to content

Commit

Permalink
fix: don't move preview window while it's focused
Browse files Browse the repository at this point in the history
  • Loading branch information
ooesili authored and lewis6991 committed Jan 4, 2023
1 parent 03639e6 commit d4f8c01
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/gitsigns/popup.lua

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

9 changes: 9 additions & 0 deletions teal/gitsigns/popup.tl
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ 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'}, {
buffer = api.nvim_get_current_buf(),
group = group,
callback = function()
api.nvim_win_set_config(winid, opts1)
end
})

return winid, bufnr
end

Expand Down

0 comments on commit d4f8c01

Please sign in to comment.