2KAbhishek / co-author.nvim

Quickly add co-authors to commits 💻🪄
GNU General Public License v3.0
23 stars 2 forks source link

Ensure co-author works in any GIT_COMMIT_MSG buffer #6

Closed kevinrobayna closed 6 months ago

kevinrobayna commented 6 months ago

What/How/Why

Fixes: https://github.com/2KAbhishek/co-author.nvim/issues/5

Before it was trying to add the text outside of the buffer when the GIT_COMMIT_MSG buffer was invoked by lazygit. The buffer looks a bit different for some reason but it's still a GIT_COMMIT_MSG buffer.

This way the string is added right on top of the line you're currently located and it works either on a buffer created by git commit or the lazygit one.

Screenshots

LazyGit

Selecting co-author for commit Screenshot 2024-05-01 at 16 16 00

The author is added below the current line Screenshot 2024-05-01 at 16 16 04

git commit

Selecting co-author for commit Screenshot 2024-05-01 at 16 16 18

The author is added below the current line

Screenshot 2024-05-01 at 16 16 21