-
-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Unstage Changes on Current Line #1051
Comments
This is already possible with |
I tried it nothing changed in two modes normal or visual _map("n", "<leader>gs", gs.stage_hunk, "Stage hunk")
_map("v", "<leader>gs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, "Stage hunk") |
9qpRWF7XRR.mp4 |
You need to pull in the latest changes to include b8cf5e8 |
Sorry, but I don't understand what I should do. Do you mean I need to update the plugin? |
Yes. Make sure to always have the latest version installed before raising issues on a tracker. |
Sorry for not paying attention. |
Yeah unstage does not work in visual mode map("v", "<leader>sh", function()
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end) Look at the code, if range is specified the staged hunk does not really caculated, it simply using current line gitsigns.nvim/lua/gitsigns/actions.lua Line 242 in 39b5b6f
@lewis6991 this should be reopen? |
That won't fix it. A PR might. |
Description
Description
I would like to request a feature that allows users to unstage changes on the current line where the cursor is focused. This functionality would complement the existing
stage_hunk
,reset_hunk
, andundo_stage_hunk
functions by providing more granular control over staging and unstaging changes.Proposed Solution
A new function,
unstage_hunk
, could be introduced with the following behavior:Thank you for considering this feature request. I believe it would be a valuable addition to the
gitsigns.nvim
plugin, enhancing its utility and user experience.Neovim version
_
Operating system and version
_
Expected behavior
_
Actual behavior
_
Minimal config
_
Steps to reproduce
_
Gitsigns debug messages
_
The text was updated successfully, but these errors were encountered: