Skip to content

Fix line numbers for adjacent multiline replacements#3412

Open
puneetdixit200 wants to merge 1 commit into
BurntSushi:masterfrom
puneetdixit200:fix-multiline-replace-line-numbers
Open

Fix line numbers for adjacent multiline replacements#3412
puneetdixit200 wants to merge 1 commit into
BurntSushi:masterfrom
puneetdixit200:fix-multiline-replace-line-numbers

Conversation

@puneetdixit200
Copy link
Copy Markdown

Fixes #2779.\n\nSummary:\n- Preserve original bytes for replaced printer output so replacement matches can map back to original line numbers.\n- Use original match line numbers for replacement output, while preserving normal line-count behavior for non-replacement multiline output.\n- Add a regression test for adjacent multiline replacements that collapse to one output line each.\n\nTests:\n- cargo test --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adjacent replaced multiline matches result in wrong line numbers

1 participant