Skip to content

Add customizable keybindings for the diff view ([keys.diff_view])#527

Merged
idursun merged 3 commits intoidursun:mainfrom
Dima-369:add-customizable-diff-mode-keybindings
Feb 14, 2026
Merged

Add customizable keybindings for the diff view ([keys.diff_view])#527
idursun merged 3 commits intoidursun:mainfrom
Dima-369:add-customizable-diff-mode-keybindings

Conversation

@Dima-369
Copy link
Copy Markdown
Contributor

Apologies for not opening an issue first to discuss this as per the contributing guidelines — the change felt small enough to submit directly.

The [keys.diff_view] config section is missing, although other modes like [keys.preview] and [keys.details] have one. I assume this was just an oversight. This PR adds it, making the diff view's scrolling, paging, and close keybindings customizable — the diff is relatively small since it follows the existing pattern.

One behavioral change: the separate Cancel (esc) and Quit (q) handlers are unified into a single close key (defaults to ["esc", "q"]), which now always closes the diff view rather than q quitting the entire app. Happy to revert this part if you'd prefer keeping the quit behavior.

@Dima-369 Dima-369 requested a review from idursun as a code owner February 13, 2026 21:06
@idursun
Copy link
Copy Markdown
Owner

idursun commented Feb 14, 2026

Hey, thanks!

This makes sense. I can back port this to #515 as it is not handled there too.

I would like to keep the current behaviour (i.e. q quits), everything else seems fine to me.

@Dima-369
Copy link
Copy Markdown
Contributor Author

I would like to keep the current behaviour (i.e. q quits), everything else seems fine to me.

Sure, can you check my last commit if that is the expected way to handle this?

@idursun
Copy link
Copy Markdown
Owner

idursun commented Feb 14, 2026

Hey, thanks! Overall looks good but there are test failures need fixing.

@Dima-369
Copy link
Copy Markdown
Contributor Author

Oops, forgot about them. Fixed now.

Copy link
Copy Markdown
Owner

@idursun idursun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@idursun idursun merged commit 9212391 into idursun:main Feb 14, 2026
4 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Feb 18, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [idursun/jjui](https://github.com/idursun/jjui) | patch | `v0.9.11` → `v0.9.12` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>idursun/jjui (idursun/jjui)</summary>

### [`v0.9.12`](https://github.com/idursun/jjui/releases/tag/v0.9.12)

[Compare Source](idursun/jjui@v0.9.11...v0.9.12)

### Release 0.9.12 (Final 0.9.x Series)

> \[!NOTE]
> This is a quick release before marking the end of 0.9.x series due to breaking changes introduced by the work in [#&#8203;533](idursun/jjui#533)

#### Fixes & Improvements

- Modal rendering now fills the entire git, bookmarks, and custom command dialogs before drawing rows, eliminating gaps introduced by the new renderer [#&#8203;535](idursun/jjui#535)
- Fixed a regression where `ui.colors.selected = { bg = "black" }` no longer highlighted the selected revision by restoring the correct lipgloss → ANSI color conversion [#&#8203;534](idursun/jjui#534)
- `jj git fetch --tracked` uses the `t` shortcut so `f` remains dedicated to the default fetch, matching the push command’s tracked shortcut [#&#8203;532](idursun/jjui#532)
- Added a `[keys.diff_view]` config section so diff scrolling, paging, and closing bindings are customizable [#&#8203;527](idursun/jjui#527)
- Completion now auto-inserts `()` when selecting a parameterless function, improving Lua/script authoring speed [#&#8203;530](idursun/jjui#530)
- Lua’s `flash()` accepts `error` and `sticky` fields, so scripts can show error toasts and control persistence without additional helpers [#&#8203;529](idursun/jjui#529)

#### What's Changed

- Auto-append () for parameterless functions in completion by [@&#8203;Dima-369](https://github.com/Dima-369) in [#&#8203;530](idursun/jjui#530)
- Add customizable keybindings for the diff view (\[keys.diff\_view]) by [@&#8203;Dima-369](https://github.com/Dima-369) in [#&#8203;527](idursun/jjui#527)
- fix(ui/git): update key for `jj git fetch --tracked` by [@&#8203;PrayagS](https://github.com/PrayagS) in [#&#8203;532](idursun/jjui#532)

#### New Contributors

- [@&#8203;Dima-369](https://github.com/Dima-369) made their first contribution in [#&#8203;530](idursun/jjui#530)

**Full Changelog**: <idursun/jjui@v0.9.11...0.9.12>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOS4yIiwidXBkYXRlZEluVmVyIjoiNDMuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants