mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-25 21:16:38 +03:00
rc git: fix off-by-one in git blame cursor target
I personally mostly use "git blame-jump" so this "git blame" bug has flown under the radar. When we run git blame in a git-diff buffer, we want to move one column to the left since the lines in the target blob don't have the +- prefix. We already subtract one but we add it back accidentally when using "l" to go to this column. Fix it. In future we should try to preserve more of the selection(s), not just the main cursor.
This commit is contained in:
parent
ae21b3a10d
commit
efaf9ab4e2
@ -260,7 +260,7 @@ define-command -params 1.. \
|
||||
message="Blaming $file as of $(git rev-parse --short $commit)"
|
||||
echo "echo -debug -- $(kakquote "$message")"
|
||||
on_close_fifo="
|
||||
execute-keys -client ${kak_client} ${cursor_line}g<a-h>${cursor_column}l
|
||||
execute-keys -client ${kak_client} ${cursor_line}g<a-h>${cursor_column}lh
|
||||
evaluate-commands -client ${kak_client} %{
|
||||
set-option buffer git_blob $(kakquote "$commit:$file")
|
||||
git blame $(for arg; do kakquote "$arg"; printf " "; done)
|
||||
|
Loading…
Reference in New Issue
Block a user