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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user