Part of #358.
Goal
Make rail consumers style-aware so parsing, highlighting, and merge/conflict helpers work correctly with both dual and single rails.
Scope
- Teach
parser.parse_buffer() to read generated rail style and store it on parsed hunks where needed.
- Update highlighting to use style-aware rail number range helpers.
- Ensure
hide_prefix overlays never cover single rail line numbers.
- Ensure
DiffsRail, DiffsRailNr, DiffsAddRailNr, and DiffsDeleteRailNr apply correctly in single rail buffers.
- Ensure merge/conflict helpers strip single rails correctly before matching or resolving hunks.
- Keep all raw hunk lines and intra-line diff logic rail-free.
Non-goals
- Do not change hunk action semantics.
- Do not change treesitter or intra-line diff algorithms except where column offsets must account for rail style.
- Do not change native split endpoint windows.
Acceptance criteria
- Parsed hunks from single-rail generated buffers match raw unified diff hunks.
- Single rail highlighting is aligned and uses the expected highlight groups.
- Merge/conflict parsing strips single rails and still resolves to working-file conflict regions.
- Existing dual-rail parser/highlight/merge tests continue to pass.
Verification
- Add parser tests using single-rail display lines.
- Add highlight tests for single-rail ranges and prefix concealment.
- Add merge/conflict tests for single-rail generated merge diffs.
Part of #358.
Goal
Make rail consumers style-aware so parsing, highlighting, and merge/conflict helpers work correctly with both dual and single rails.
Scope
parser.parse_buffer()to read generated rail style and store it on parsed hunks where needed.hide_prefixoverlays never cover single rail line numbers.DiffsRail,DiffsRailNr,DiffsAddRailNr, andDiffsDeleteRailNrapply correctly in single rail buffers.Non-goals
Acceptance criteria
Verification