Commits
- Commit:
827a167b34401bd6541b199377e4e6c68d643151
- From:
- Josiah Frentsos <jfrent@tilde.team>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
Group options in accordance with style(9)
patch by Josiah Frentsos
- Commit:
374f69ddc0b897e90fa603748cac7859adac2769
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
tog: add missing checks for NULL pointers in log view state
ok jamsek
- Commit:
11edf34c28f6c60a1d37d5c83c758e90df02fe7a
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
df68a56be62fb658f8307fc5321e12b7b9fce746
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
631e7531fb307436e7797fdf83128e94367ee807
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
cbb0c8d7953cebb583b29d56dc27f83a38924411
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
6a5ff2d4f6001aa22007d025482d4cd6109a6b0d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: drop regex for line types to colour the diff view
ok stsp@
- Commit:
c7d5c43cafada3470647a8b876d489018002f713
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
94b80cfa87e0bfc8933b9e7614974209e87de290
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
78368643b1a7e297cd29cca32debb6514d206df1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove pointless repo_close with leaked error; found by florian with scan-build
- Commit:
279d204752d9f8c22b1a45fa30e4aa8e45f43fb9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix two missing error checks in tog; found by florian with scan-build
- Commit:
136e2bd4b6c85e936c03593405dbdfcefb34fb79
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
5e98fb339b4588f8e07c12b9f9ace9dbdcc47592
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: uppercase alpha key maps that open new views
ok stsp@
- Commit:
01a7bcaf15198d23a77acc28899c3c206cdc5001
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
6fe51fee00c219cf4a74684211a620b3ff9f02ef
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
dff918251f8c81f6d1a277cf8e9f4f348ebee837
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
a310d9c3a96d8b9ec72eb3fe1f2251b8ba5aa61f
- From:
- Florian Obser <florian@narrans.de>
- Date:
Do not ignore error from format_author().
Found by llvm's scan-build (dead store).
OK stsp
- Commit:
05f04cdf3fa9619d7055f098b55f1633dbbf12c0
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
2b3e6702748e05e788bfea21aa384af4352e859b
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
10aab77fd5164e672b109e74278bc080a7546fb8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
tog: add key to toggle author/committer in log view
improvements and ok by jamsek and stsp
- Commit:
571ccd7300860975e644c75afcc015ad6c4d7ffd
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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:
ad055527e4991dce8cf1648f406a4af5e69b55c2
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
style(9) whitespace fix
- Commit:
2525dccb913c5e7f293cfcad103af7a761d32b34
- From:
- Mark Jamsek <mark@jamsek.dev>
- 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@
- Commit:
27187d45e7a2f096a06777e5ffde690e3c049490
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: only request commits when child hsplit increases
Fix bug introduced in 3c1dfe12b3 that fails to properly populate child log
views due to incorrect request_log_commits() calls: (1) when increasing the
bottom hsplit in a ref/log splitscreen; and (2) when reopening a child log
view after closing a resized child log view:
$ TOG_VIEW_SPLIT_MODE=h tog ref
return # open log view in bottom split
4+ # increase log (child/bottom) split
*new log lines are not populated*
q # close log view
return
*commits are not loaded*
ok stsp@
- Commit:
d9a7ab538a90fea0c81ac4c31fd196123baf4fd4
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: adjust view line offset when resizing hsplit
Squish bug that can move the selection cursor offscreen when resizing
horizontal splits due to bogus offset:
$ TOG_VIEW_SPLIT_MODE=h tog # 80x24
22j
return # open diff view in a hsplit
tab # focus log (top) split
10+ # increase top split by 10 lines
22j
return # open diff view in a hsplit
F # toggle fullscreen diff view
tab # focus log (parent) view in fullscreen
*selection cursor will be off the bottom of the screen*
ok stsp@