-
Notifications
You must be signed in to change notification settings - Fork 13
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
Navigation between hunks #19
Comments
@Kodecheff Thanks :) You are assigned to this issue. |
@Kodecheff Hey! Another Outreachy applicant here! Are you still working on this issue? If not, I would love to work on this one. We can also work together if you are blocked:) |
@Julow Greetings! Since this issue has been inactive for a while now, can I work on this? I don't know if I should ask this, but no other issues were unassigned. I apologize if this is a bad practice. |
Hi @Siddhi-agg I am still actively working on this. Thank you |
@Siddhi-agg Sorry, I do not want to unassign an issue so fast. |
@panglesd Just to clarify, this issue requires binding f and b keys to move to the next and previous hunks respectively. Because n and p currently do that; so I just need to replace the keys. That's about it right? |
There's a slight difference between n/p and f/b. A file can contain several hunks. The diff --git a/lib/interactive_viewer.ml b/lib/interactive_viewer.ml
index 79db405..85018ce 100644
--- a/lib/interactive_viewer.ml
+++ b/lib/interactive_viewer.ml
@@ -60,8 +60,6 @@ let navigate z_patches (dir : direction) : unit =
| Prev -> Lwd.set z_patches (Zipper.prev z)
| Next -> Lwd.set z_patches (Zipper.next z)
-let quit = Lwd.var false
-
let additions_and_removals lines =
let add_line (additions, removals) line =
match line with
@@ -95,6 +93,8 @@ let change_summary z_patches : ui Lwd.t =
in
W.string ~attr:Notty.A.(fg lightcyan) operation_count
+let quit = Lwd.var false
+
let view (patches : Patch.t list) =
let z_patches : 'a Zipper.t Lwd.var =
match Zipper.zipper_of_list patches with Files start with a line starting in The |
@Kodecheff is it clearer with @Julow's explanations? Since half of the contribution period has passed and we are missing good first issues, we now require assigned contributors to open a PR not too long after having being assigned a good first issue. The PR does not have to be fully finished, but has to show progress on the issue. Could you open a PR with your progress, by Wednesday (or reach out if that causes a problem)? If not, we might have to assign the issue to someone else. |
Hello @panglesd @Julow sorry for the delay in sending a PR. I am having a problem with the
|
Before you do anything else make sure to pull the latest version of the repository. The code changed a lot since you started working on this and is now very different from the code you based your modification on. The
|
Hi, have you been able to pull the latest changes ? |
Pressing
n
(next) andp
(previous) navigates between operations: creation of a file, removal of file, edition, renaming, ...Each operation contains several hunks of changes, that are displayed one after the other.
It would be nice to be able to only see one hunk, and navigate through them using
f
(forward) andb
(backward).The top status bar should ideally display the number of the visible hunk, as well as the total number of hunks.
The text was updated successfully, but these errors were encountered: