add selected hunk count view

tzemanovic
Mar 10, 2026, 3:00 PM
5CPJ526PV36NY3Z4HEPDIWZHA4K4ENTJ52EADXUWAKNBQDIZDDVAC

Dependencies

  • [2] 23SFYK4Q big view refactor into a new crate
  • [3] SASAN2XC use nav-scrollable
  • [4] 5O4FWCFP add tests to_record selection and improve it
  • [5] KEPKF3WO unify diffs handling, simplify view
  • [6] 3XRG4BB6 rewritten nav-scrollable!
  • [7] 2SLTGWP6 add change files diffs to-record selection
  • [8] FU6P5QLG indicate when a file is a dir with appended '/'
  • [9] XZ6D3UUE avoid alloc
  • [10] C5P3JIFC refactor out the nav-scrollable children len arg
  • [11] UR4J677R nav for log changes and refactors
  • [12] KWTBNTO3 diffs selection and scrolling

Change contents

  • replacement in inflorescence_view/src/diff.rs at line 136
    [2.5499][4.1407:1459]()
    let nav = if diff_selected && select_sections {
    [2.5499]
    [4.1459]
    let nav_view = if diff_selected && select_sections {
  • replacement in inflorescence_view/src/diff.rs at line 151
    [4.1829][4.1829:1857]()
    let sections = el(nav);
    [4.1829]
    [3.919]
    let sections = el(nav_view);
  • replacement in inflorescence_view/src/diff.rs at line 153
    [3.920][3.920:963]()
    if diffs_without_contents.is_empty() {
    [3.920]
    [3.963]
    let nav_with_sections = if diffs_without_contents.is_empty() {
  • edit in inflorescence_view/src/diff.rs at line 162
    [3.1078]
    [2.5866]
    };
    if select_sections {
    let selected_hunk_ix = nav.get_selected_section_ix().unwrap_or(0) + 1;
    let hunk_count = combined
    .sections
    .iter()
    .filter(|section| matches!(section, Section::Changed { .. }))
    .count();
    el(column([
    el(text(format!(
    "Selected hunk: {}/{}",
    selected_hunk_ix, hunk_count
    ))),
    nav_with_sections,
    ])
    .spacing(10))
    } else {
    nav_with_sections