Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Summary

- [] Closes issue #...
- [] Closes #<issue number>
- [] I have read the [CONTIBUTING.md](../CONTRIBUTING.md) and [AI_POLICY.md](../AI_POLICY.md) guides

## How Did You Test this Change?
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ If you want the exact delta configuration I'm using - [it can be found here](htt
| <kbd>k</kbd> | Previous node |
| <kbd>n</kbd> | Next file |
| <kbd>p</kbd> / <kbd>N</kbd> | Previous file |
| <kbd>Ctrl-d</kbd> | Scroll the diff down |
| <kbd>Ctrl-u</kbd> | Scroll the diff up |
| <kbd>Ctrl-d</kbd> | Scroll the diff half page down |
| <kbd>Ctrl-u</kbd> | Scroll the diff half page up |
| <kbd>Ctrl-e</kbd> | Scroll the diff one line down |
| <kbd>Ctrl-y</kbd> | Scroll the diff one line up |
| <kbd>e</kbd> | Toggle the file tree |
| <kbd>t</kbd> | Search/go-to file |
| <kbd>y</kbd> | Copy file path |
Expand Down
14 changes: 12 additions & 2 deletions pkg/ui/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type KeyMap struct {
PrevFile key.Binding
CtrlD key.Binding
CtrlU key.Binding
CtrlE key.Binding
CtrlY key.Binding
ScrollLeft key.Binding
ScrollRight key.Binding
ToggleFileTree key.Binding
Expand Down Expand Up @@ -67,11 +69,19 @@ var keys = &KeyMap{
),
CtrlD: key.NewBinding(
key.WithKeys("ctrl+d"),
key.WithHelp("ctrl+d", "diff down"),
key.WithHelp("ctrl+d", "diff half page down"),
),
CtrlU: key.NewBinding(
key.WithKeys("ctrl+u"),
key.WithHelp("ctrl+u", "diff up"),
key.WithHelp("ctrl+u", "diff half page up"),
),
CtrlE: key.NewBinding(
key.WithKeys("ctrl+e"),
key.WithHelp("ctrl+e", "diff line down"),
),
CtrlY: key.NewBinding(
key.WithKeys("ctrl+y"),
key.WithHelp("ctrl+y", "diff line up"),
),
ScrollLeft: key.NewBinding(
key.WithKeys("left"),
Expand Down
9 changes: 8 additions & 1 deletion pkg/ui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,14 @@ func (m mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if cmd != nil {
cmds = append(cmds, cmd)
}
case key.Matches(msg, keys.CtrlD, keys.CtrlU):

case key.Matches(msg, keys.CtrlE):
m.diffViewer.ScrollDown(1)

case key.Matches(msg, keys.CtrlY):
m.diffViewer.ScrollUp(1)

case key.Matches(msg, keys.CtrlD, keys.CtrlU, keys.CtrlE, keys.CtrlY):
m.diffViewer, cmd = m.diffViewer.Update(msg)
cmds = append(cmds, cmd)
default:
Expand Down
Loading