[2mdiff --git a/src/main.rs b/src/main.rs[0m
[2mindex 55a7c18..8826249 100644[0m
[1m--- a/src/main.rs[0m
[1m+++ b/src/main.rs[0m
[36m[2m@@ -90,7 +91,15 @@ [1mfn get_fixed_highlight(line: &str) -> &str {[0m
 }

 fn print(stream: &mut BufWriter<&mut dyn Write>, text: &str) {
[31m-    stream.write_all(text.as_bytes()).[7munwrap[27m();[0m
[32m+    [7mif let Err(error) = [27mstream.write_all(text.as_bytes())[7m {[0m
[32m+        if error.kind() == ErrorKind::BrokenPipe {[0m
[32m+            // This is fine, somebody probably just quit their pager before it[0m
[32m+            // was done reading our output.[0m
[32m+            exit(0);[0m
[32m+        }[0m
[32m+[0m
[32m+        panic!("Error writing diff to pager: {:?}", error);[0m
[32m+    }[0m
 }

 fn println(stream: &mut BufWriter<&mut dyn Write>, text: &str) {
