Calculate correct commit in the log view for page up/down

The correct commit in the log view has to be inferred from the context
for page-up/page-down as well. This commit adds that check.

Signed-off-by: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>