Commit Briefs
tog: add n{G,g} key map to jump to line n like less(1)
Available to all views; for example, 99g will navigate to line 99 in the file if in a blame view or the 99th commit if in a log view. Includes improvements suggested by naddy and stsp. ok naddy@
tog: refactor key map -> new view initialisation
Deduplicate view initialisation boilerplate and simplify new key map view requests with dispatch routine. Includes improvements suggested by stsp. ok stsp@
tog: reset view->offset when clearing log view state
Don't move the selection cursor due to a bogus offset after closing child views following use of 'B', C-l, and backspace log view key maps. ok stsp@
tog: use view->resize idiom to ensure log is populated
Replace view->mode == TOG_VIEW_LOG checks for requesting commits to populate the log view with calls to view->resize(). ok stsp@
tog: populate new child view log lines when switching split
When switching a child log view from a h- to a v-split, new log lines are empty. Rather than (mis)trace height and (not) call request_log_commits(), let resize_log_view() do the math and request commits if needed to draw new lines. ok op@
Do not ignore error from format_author().
Found by llvm's scan-build (dead store). OK stsp
tog: blame view keymap to open log of annotated line
As per stsp's TODO item: open a log view of the selected line with 'L'. helped by and ok stsp@
tog: alias J and K to > and < keybindings for diff view
Use J and K to move to the next and previous commits, respectively, when the diff is loaded from the log or blame views. Patch by Mikhail ok stsp@
tog: add key to toggle author/committer in log view
improvements and ok by jamsek and stsp
tog: always request commits if log height is increased
Includes style improvements prompted by stsp. Previously, we would only call request_log_commits() when terminal height is increased in a splitscreen view. This fixes the case when a log view with no children is resized that can lead to empty lines: $ tog # 80x24 23j # move down to the last commit *increase terminal height to ~30 lines then reduce back to 80x24* ~5j # move down to the _last_ commit *increase terminal height to ~33 lines* *new lines are empty* ok stsp@
tog: fix sticky "loading..." status in log view hsplit
Don't request commits if the log has completed loading all commits. While here, ensure the correct parent/child view requests commits when resizing a hsplit. Reported by stsp: $ tog S # switch into hsplit mode G # move to bottom and load all commits Enter # open a diff showing the initial import commit - # shrink the diff view by one line; alternatively use + to grow it *log status stuck with "loading..." in the header* ok stsp@