Skip to content

fix(file_history): use file.revs in open_in_diffview (#231)#232

Merged
dlyongemallo merged 1 commit into
mainfrom
diff1_open_in_diffview_history_panel_error
Jun 10, 2026
Merged

fix(file_history): use file.revs in open_in_diffview (#231)#232
dlyongemallo merged 1 commit into
mainfrom
diff1_open_in_diffview_history_panel_error

Conversation

@dlyongemallo

Copy link
Copy Markdown
Owner

The listener cast file.layout to Diff2 and read .a.file.rev / .b.file.rev, which crashes under diff1_* layouts where the layout has no .a window. Use file.revs directly -- it is the canonical rev pair on every FileEntry regardless of layout.

Also drop a stale @as Diff2 annotation on default_layout in file_history_panel.lua.

Fixes #231.

The listener cast `file.layout` to `Diff2` and read `.a.file.rev` /
`.b.file.rev`, which crashes under `diff1_*` layouts where the layout
has no `.a` window. Use `file.revs` directly -- it is the canonical
rev pair on every `FileEntry` regardless of layout.

Also drop a stale `@as Diff2` annotation on `default_layout` in
`file_history_panel.lua`.
@dlyongemallo dlyongemallo merged commit 318a75a into main Jun 10, 2026
7 checks passed
@dlyongemallo dlyongemallo deleted the diff1_open_in_diffview_history_panel_error branch June 10, 2026 18:33
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.

[Bug] open_in_diffview actions raise an error with history panel diff1 layout

1 participant