mirror of
https://github.com/mawww/kakoune.git
synced 2024-10-04 00:27:19 +03:00
54992c08ae
Staging/unstaging/reverting (parts of) the current buffer's file can be a common use case. Today "git apply" can do that based on a selection within a diff. When the selection is on uncommitted content, we can probably assume that the intent is to use the part of the selection that overlaps with the +-side of "git diff" (or "git diff --cached" for "git apply --cached"). Make "git apply" treat selections as content if the buffile is tracked by Git. This differentiator is not perfect but I don't know why anyone would want to use the existing "git apply" semantics on a tracked file. Maybe we should pick a different name. This feature couples well with "git show-diff", which shows all lines with unstaged changes (in future it should probably show staged changes as well). Whereas on diffs, "git apply" stages the entire hunk if the selection contains no newline, this does not happen when operating on content. I didn't yet try implementing that. I guess the hunks are not as explicit here. Closes #5225 |
||
---|---|---|
.. | ||
pages | ||
autoedit.asciidoc | ||
coding-style.asciidoc | ||
design.asciidoc | ||
interfacing.asciidoc | ||
json_ui.asciidoc | ||
kak.1 | ||
kakoune_logo.svg | ||
screenshot-i3.gif | ||
screenshot-tmux.gif | ||
writing_scripts.asciidoc |