Implement Show for HunkLine
altsem opened this issue · comments
altsem commented
This could be solved by translating a line in a hunk into a line in a file:
@@ -7,2 +7,1 @@
-hello
-there
-> +extra
..translates to line 7
@@ -7,2 +7,1 @@
-hello
-> -there
+extra
..translates to line 8, although gitu doesn't display historical files at the moment. Just show the new file at line 8 meanwhile.
// Add this clause at src/ops/show.rs:16
// Some(TargetData::HunkLine(hunk, line)) => {
// editor(h.new_file.as_path(), Some(*correct line goes here*))
// }
altsem commented
Might be too complicated for something that won't be solid anyway