feat(fugitive): line position tracking for keymaps
When pressing `du`/`dU` from a hunk line in the fugitive status buffer (after expanding with `=`), the unified diff now opens at the corresponding line instead of line 1. Implementation: - `fugitive.get_hunk_position()` returns @@ header and offset when on a hunk line - `commands.find_hunk_line()` finds matching @@ header in diff buffer - `commands.gdiff_file()` accepts optional `hunk_position` and jumps after opening Also updates @phanen's README credit for the previous two fixes. Closes #65
This commit is contained in:
parent
a6d4dcff1f
commit
9e857d4b29
5 changed files with 247 additions and 8 deletions
|
|
@ -69,4 +69,5 @@ luarocks install diffs.nvim
|
|||
- [`vim-fugitive`](https://github.com/tpope/vim-fugitive)
|
||||
- [`codediff.nvim`](https://github.com/esmuellert/codediff.nvim)
|
||||
- [`diffview.nvim`](https://github.com/sindrets/diffview.nvim)
|
||||
- [@phanen](https://github.com/phanen) - diff header highlighting
|
||||
- [@phanen](https://github.com/phanen) - diff header highlighting, unknown
|
||||
filetype fix, shebang/modeline detection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue