diff --git a/rc/filetype/diff.kak b/rc/filetype/diff.kak index 586bb32c..6658bab0 100644 --- a/rc/filetype/diff.kak +++ b/rc/filetype/diff.kak @@ -32,7 +32,7 @@ Switches: set-register c %val{cursor_column} # If there is a "diff" line, we don't need to look further back. try %{ - execute-keys %{^diff\b} + execute-keys %{^(?:> )*diff\b} } catch %{ # A single file diff won't have a diff line. Start parsing from # the buffer start, so we can tell if +++/--- lines are headers @@ -73,6 +73,7 @@ Switches: $have_diff_line = 0; $state = "header"; while () { + s/^(> )*//g; $last_line = $_; if (m{^diff\b}) { $state = "header";