delta: đ `--navigate` breaks `git log --oneline` and empty `git diff`
Clean repo and running git diff

Running git log --oneline gives same error.
Note that in both cases hitting Enter will make it print out the correct stuff (which makes #234 really obvious)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 17 (8 by maintainers)
Commits related to this issue
- Fix broken link to issue #237 in README — committed to roryokane/delta by roryokane 4 years ago
- Fix broken link to issue #237 in README (#354) — committed to dandavison/delta by roryokane 4 years ago
- fix(git): delta --navigate breaks small output see dandavison/delta#237 — committed to brendanarciszewski/dotfiles by brendanarciszewski 3 years ago
Thanks @cben and @dandavison! Very clever! This fixes a long standing annoyance I had with
git stash list.Yep, this works great now. Thanks!
Oooh, here is a weird idea (which is maybe what you were getting at): donât pass a pattern to
lessat all! Instead, append it to$HOME/.lesshst, then callless. Pressing <kbd>n</kbd> with no active pattern uses the last one from history đThis has several benefits when the diff is short, including --quit-if-one-screen compatibility, and not filling the screen _until you press <kbd>n</kbd> or <kbd>N</kbd>.
Simply appending doesnât work; the format is not quite documented, need
"before the pattern but there are few âsectionsâ starting with.so it doesât always belong at the end (e.g. with--save-marksthere may be.marksection after.search)⌠The file name also varies.We could make
lessappend it for us, something like:Normally that exits immediately with no visible output, but thatâs an illusion â it wrote to the âalternate bufferâ and switched back too fast to notice. Proof:
echo $'\e[?47h'(switch to alt buffer without clearing). With--no-init, or terminal configs that donât support/use alt buffer youâll see that line plus a full screen of~âšď¸. (This goes back to that StackExchange issue: less canât search without painting the full screen.) And if I redirect> /dev/null, less wonât actually search (itâs in bypasscat-like mode), the history file is unaffected.Donât have time to play more with this now. This is promising, but also increasingly fragile and ideally needs explicit flags for the desired search behavior in
lessitself.