Commits
- Commit:
d3f8b1f9b4928339a8421ee84b92b407104086d5
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: remove gcc ternary if extension
ok stsp@
- Commit:
d6506a3d8fbcc06720765fc488978d6ad81202d4
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
Group options in accordance with style(9)
patch by Josiah Frentsos
- Commit:
2510002603337f808dc9857a6904a9ca3a6e9f22
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: add missing checks for NULL pointers in log view state
ok jamsek
- Commit:
c0be89335b195b639d4dd9a3159ddf6f38937444
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: don't block when processing log view 'G' key map
As per stsp's TODO item, make tog respond to key presses while "loading..."
history. Initial testing in src.git appears to work as intended.
ok stsp@
- Commit:
6f5f393a4c4429e6729a0e6b3d7353c5cc29ccb4
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: fix delayed tree index update
If a child blame view has been opened, halfdelay() is reset to a 1 second
refresh rate, so the index in the header lags behind subtree navigation as we
set the index based on the selected tree entry, which isn't updated till that
refresh cycle completes. Don't wait for the selected_entry to update; instead,
compute the index from the first displayed entry and the currently selected
line index.
improved by and ok stsp@
- Commit:
7ed048bd205ddb22d99df94e64ca3354aba2166e
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: move all 'G' logic into log_move_cursor_down()
Previously, we only handled 'G' in log_move_cursor_down() when all commits had
not yet been loaded; move the case where all commits are already loaded into
this routine too, and simplify by handling both cases the same. This change
was prompted by Mikhail's observation of a redundant assignment in the previous
'G' handling in log_move_cursor_down().
ok stsp@
- Commit:
bd3f8225b56f97f01b4654bcfa30f383621e933a
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: fix log 'd' keymap when last commit is displayed
When at the end of the log view such that the currently selected line is
greater than nlines/2, add--don't assign--the page down value to the selected
index so we don't jump up when the user expects tog to scroll down. While
here, rework log page down logic for a smoother UX in horizontal split mode by
moving the selection cursor down rather than scrolling when 'd' or 'f' is
entered if the last commit is already on screen.
ok stsp@
- Commit:
6568f0aa4b5fbbbb938dc9e31e3d6232fb5e6a6e
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: drop regex for line types to colour the diff view
ok stsp@
- Commit:
82c78e96f11e4190c3d91f18122df14e30347300
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: keymaps to jump to next/prev file/hunk in the diff
Add () and {} key maps to navigate to the previous and next file or hunk in
the diff. This required changing Got's diff API to collect line type metadata
in addition to the line offsets already produced as prompted by stsp.
ok stsp@
- Commit:
07dd3ed35a32846bee5a7e36c2423eb8b404b9e3
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
6f0bf9bf2208992840af747296f09053d37593f3
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove pointless repo_close with leaked error; found by florian with scan-build
- Commit:
cf1fe301a38235134f7eb246ec0258c003b76e6f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix two missing error checks in tog; found by florian with scan-build
- Commit:
2a31b33bf654723ac3cf71726e41425f7fa9ab7b
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
1be4947a5c2d3f42e8dda37929997907d116b746
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: uppercase alpha key maps that open new views
ok stsp@
- Commit:
94ecf40da5315d7cb59ff90ac23614ac0f2a4f3a
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
3a0139e86b2f9a57742d59dad86f8386532ba872
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
f4e6231a850cc8e3edfb791f86ca3f8f4a9d6245
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
ef944b8b4a94171b8635afaf4a8354d652f841cd
- From:
- Florian Obser <florian@narrans.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
Do not ignore error from format_author().
Found by llvm's scan-build (dead store).
OK stsp
- Commit:
eaeaa612f1b842e2b6769ad9cf017064bfbaa06c
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
777aae211a624f0a3c1a7b286382455bd1097c8b
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
f69c5a468f5e08db053b390fc00d2e2e70bf4d53
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
tog: add key to toggle author/committer in log view
improvements and ok by jamsek and stsp
- Commit:
ea0bff0410416cb40cf1c0f069bfd6f14429cbbe
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
8b925c6ccd3968917253ea191906a1710c40ed2d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add back sys/queue.h
Now that the handling of including sys/queue.h is better, there's no
need to remove those lines from the source. Copy the location of those
original sys/queue.h lines from upstream at the same line number, so as
to avoid any conflicts in the future.
- Commit:
47f5fcf41317c40edd55c23ad3e89462980d2549
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style(9) whitespace fix
- Commit:
fe731b51aaf9031ee68b950393f97f9654bee63f
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@