Escape closes the full-screen diff page

The file diff page (from a turn's files-changed chip or run Changes) now
closes on Escape, like its back button.
This commit is contained in:
2026-11-09 23:34:27 +00:00
parent 371d29224c
commit 98e5ecf501
2 changed files with 26 additions and 1 deletions
@@ -306,10 +306,12 @@ class _FileDiffPageState extends State<FileDiffPage> {
onPrevious: _index > 0 ? () => _step(-1) : null,
onNext: _index < count - 1 ? () => _step(1) : null,
);
// Left/right arrows step between changed files, like the chevrons.
// Left/right arrows step between changed files, like the chevrons;
// Escape closes the page, like its back button.
final body = ArrowKeyPager(
onPrevious: _index > 0 ? () => _step(-1) : null,
onNext: _index < count - 1 ? () => _step(1) : null,
onEscape: () => Navigator.of(context).maybePop(),
child: FloatingBarOverlay(
bar: pager == null
? const SizedBox.shrink()