Skip to content

Commit 4600fe5

Browse files
committed
fix: address Copilot review findings
Update docs to reflect that help toggle is remappable via ActionHelp, fix N key description in README, improve parse warning log message.
1 parent 9a6b15a commit 4600fe5

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

.claude-plugin/skills/revdiff/references/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ map ctrl+d half_page_down
100100

101101
Available actions: `down`, `up`, `page_down`, `page_up`, `half_page_down`, `half_page_up`, `home`, `end`, `scroll_left`, `scroll_right`, `next_item`, `prev_item`, `next_hunk`, `prev_hunk`, `toggle_pane`, `focus_tree`, `focus_diff`, `search`, `confirm`, `annotate_file`, `delete_annotation`, `annot_list`, `toggle_collapsed`, `toggle_wrap`, `toggle_tree`, `toggle_line_numbers`, `toggle_hunk`, `filter`, `quit`, `discard_quit`, `help`, `dismiss`
102102

103-
Modal keys (annotation input, search input, help overlay, confirm discard) are not remappable.
103+
Modal keys (annotation input, search input, confirm discard) are not remappable.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ git diff → diff.ParseUnifiedDiff() → []DiffLine
6262
- Keybindings file: `~/.config/revdiff/keybindings` (`map <key> <action>` / `unmap <key>` format)
6363
- `--keys` overrides keybindings path, `--dump-keys` prints effective bindings
6464
- `keymap.Keymap` passed to `Model` via `ModelConfig.Keymap`; handlers switch on `m.keymap.Resolve(msg.String())` instead of raw key strings
65-
- ~30 `Action` constants in `keymap/keymap.go` (e.g., `ActionDown`, `ActionQuit`); modal keys (annotation input, search input, help overlay) stay hardcoded
65+
- ~30 `Action` constants in `keymap/keymap.go` (e.g., `ActionDown`, `ActionQuit`); modal text-entry keys (annotation input, search input, confirm discard) stay hardcoded; help toggle is routed through `ActionHelp`
6666
- Help overlay is dynamically rendered from `m.keymap.HelpSections()`
6767

6868
## Claude Code Plugin

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ This mode activates when all three conditions are met: single file, markdown ext
332332
|-----|--------|
333333
| `/` | Start search in diff pane |
334334
| `n` | Next search match (overrides next file when search active) |
335-
| `N` | Previous search match |
335+
| `N` | Previous file (previous search match when searching) |
336336
| `Esc` | Cancel search input / clear search results |
337337

338338
**Annotations:**
@@ -383,7 +383,7 @@ mkdir -p ~/.config/revdiff
383383
revdiff --dump-keys > ~/.config/revdiff/keybindings
384384
```
385385

386-
Then edit to taste. Modal keys (annotation input, search input, help overlay, confirm discard) are not remappable.
386+
Then edit to taste. Modal keys (annotation input, search input, confirm discard) are not remappable.
387387

388388
<details>
389389
<summary>Available actions (click to expand)</summary>

keymap/keymap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ func parse(r io.Reader) (maps []mapEntry, unmaps []string, err error) {
360360
key := normalizeKey(fields[1])
361361
unmaps = append(unmaps, key)
362362
default:
363-
log.Printf("[WARN] keybindings:%d: unknown command %q, skipping", lineNum, line)
363+
log.Printf("[WARN] keybindings:%d: unknown command %q in line %q, skipping", lineNum, cmd, line)
364364
}
365365
}
366366
if err := scanner.Err(); err != nil {

ui/annotlist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (m Model) injectBorderTitle(box, title string, popupWidth int) string {
179179
}
180180

181181
// handleAnnotListKey handles keys when the annotation list popup is visible.
182-
// j/k/arrows navigate, Enter jumps to annotation, Esc/@/action-key closes, all other keys consumed.
182+
// j/k/arrows navigate, Enter jumps to annotation, Esc/annot_list key closes, all other keys consumed.
183183
func (m Model) handleAnnotListKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
184184
// resolve action to allow closing popup with the same key that opens it (remappable)
185185
action := m.keymap.Resolve(msg.String())

0 commit comments

Comments
 (0)