dmitri.shuralyov.com/app/changes

Add p/n keyboard shortcuts to go to previous/next commit.
dmitshur committed 6 years ago commit 8cb7a5a1f7cc9898d5c2521dcb8fc9d5e4682242
Showing partial commit. Full Commit
Collapse all
main.go
@@ -452,10 +452,11 @@ func (h *handler) ChangeFilesHandler(w http.ResponseWriter, req *http.Request, c
			commit.PrevSHA = cs[prev].SHA
		}
		if next := i + 1; next < len(cs) {
			commit.NextSHA = cs[next].SHA
		}
		state.PrevSHA, state.NextSHA = commit.PrevSHA, commit.NextSHA
	}
	var opt *change.GetDiffOptions
	if commitID != "" {
		opt = &change.GetDiffOptions{Commit: commitID}
	}