grep names each file once with its lines under it, the changes header keeps its position whole, and the bash teardown tests stop flaking on macOS

- grep groups its lines under each file, the layout of rg --heading, rather than repeating the
  path on every line: 9–28% fewer bytes than rg -n on the searches measured. scopes: true labels
  each run of matches with the function or type around it.
- The changes pane's header shortens the path rather than cut its position, and keeps a gap
  before the FILE / DIFF switch.
- The bash teardown tests count a loop still running as a survivor, not one write already under
  way when the kill landed.
This commit is contained in:
Evan Whittaker
2026-10-18 09:18:05 -05:00
parent 7b460ab9c7
commit 933c1195b4
23 changed files with 673 additions and 163 deletions

View File

@@ -442,10 +442,18 @@ mod tree_teardown {
format!("(for _ in $(seq 1 40); do touch {}; sleep 0.25; done) & wait", marker.display())
}
/// Whether anything is still touching `marker` after it is removed.
/// Whether anything is still touching `marker`, the loop, once a touch that was already under
/// way has had its moment.
///
/// The kill reaches the whole group at once, but a `touch` forked as it lands can finish one
/// write after it, and on macOS's slower teardown that write can follow the first clear. One
/// straggling write is not a survivor; a loop still running touches again within a quarter
/// second of the second clear.
async fn survivor_still_running(marker: &std::path::Path) -> bool {
let _ = std::fs::remove_file(marker);
tokio::time::sleep(Duration::from_millis(1_200)).await;
tokio::time::sleep(Duration::from_millis(300)).await;
let _ = std::fs::remove_file(marker);
tokio::time::sleep(Duration::from_millis(1_000)).await;
marker.exists()
}