Diff viewer: vim keys, scrolling, find in diff and an all-files view
Left/right and h/l step between files (or headers in the all-files view), up/down and j/k scroll, / opens find-in-diff (highlighted matches across every file, n/N or Enter/Shift+Enter to move, Escape to close), and a top-bar toggle switches between one file at a time and every file stacked with collapsible headers, like a pull request's Files changed tab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,14 +6,21 @@ import 'package:flutter/material.dart';
|
||||
/// The text keeps its intrinsic line width, so long lines scroll sideways
|
||||
/// instead of wrapping a continuation under a new line.
|
||||
class RawPatchView extends StatelessWidget {
|
||||
const RawPatchView({super.key, required this.patch, required this.style});
|
||||
const RawPatchView({
|
||||
super.key,
|
||||
required this.patch,
|
||||
required this.style,
|
||||
this.controller,
|
||||
});
|
||||
|
||||
final String patch;
|
||||
final TextStyle style;
|
||||
final ScrollController? controller;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
controller: controller,
|
||||
padding: const EdgeInsets.fromLTRB(16, 0, 16, 16),
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
|
||||
Reference in New Issue
Block a user