fix: correct newline handling for p and x commands#378
Open
pocopepe wants to merge 3 commits intouutils:mainfrom
Open
fix: correct newline handling for p and x commands#378pocopepe wants to merge 3 commits intouutils:mainfrom
pocopepe wants to merge 3 commits intouutils:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #378 +/- ##
==========================================
- Coverage 82.25% 82.25% -0.01%
==========================================
Files 13 13
Lines 5438 5522 +84
Branches 304 310 +6
==========================================
+ Hits 4473 4542 +69
- Misses 963 977 +14
- Partials 2 3 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 6.47%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | access_log_no_op |
747.7 ms | 781.1 ms | -4.27% |
| ❌ | access_log_append |
634.7 ms | 669.7 ms | -5.23% |
| ⚡ | access_log_all_del |
541.5 ms | 523.7 ms | +3.39% |
| ❌ | no_op_short |
964 ms | 1,030.6 ms | -6.47% |
Comparing pocopepe:issue-306-143 (22b5356) with main (7b204c0)
dspinellis
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #306 and #143
has_newline: true, causing1xto output nothing instead of an empty line when input has no trailing newlinepwas unconditionally appending\n, breaking-n pon no-newline inputFixed by initializing hold space as newline terminated and adding a
pending_newlinemechanism inOutputBufferthat defers newline injection until the next write, so-nmode never triggers itAlso incidentally fixes the
g/Gempty hold space behavior from #266 (overlaps with open PR #263 same bug, different approach)