Repository navigation
Message pager drops blank separators when scrolling back - #21444
akasakariko wants to merge 1 commit into
Conversation
The msg_sb_eol() change is not covered by the new testThe comment in the new test says the single newline case checks that g< also changesWith this PR, :echo "a\n"
" press Enter, then g<master shows "a" and the prompt right below it; this PR shows the Comment in msg_puts_display()"including empty lines" refers to the condition that was removed. // Store the text for scroll back.Commit messageThe subject should state the problem, and the body needs the |
|
I'll address these |
Problem: Message pager drops blank separators when scrolling back.
Solution: Store standalone newline chunks during message display and
avoid adding an extra blank line in msg_sb_eol() when a trailing
newline exists (KayanoLiam).
When scrolling back through message output in the pager using 'b' or
PageUp, blank lines acting as separators are omitted. Standalone newline
chunks were not stored in msg_puts_display(), causing scrollback history
to drop empty lines. In addition, msg_sb_eol() is guarded to avoid adding
a spurious blank line when a trailing newline already exists, ensuring
trailing empty lines are preserved by 'G' at the more prompt and 'g<'
after Enter.
OpenAI Codex assisted investigation, code and test changes, and validation.
Antigravity Gemini 3.8 Flash drafted the title and body.
fixes: vim#21315
closes: vim#21444
Assisted-by: OpenAI Codex
Assisted-by: Antigravity Gemini 3.8 Flash
8fe0460 to
bcdd3cb
Compare
|
Updated in bcdd3cb:
Confirmed both regression tests fail with the pre-PR implementation. Reverting only the |
What does this change do?
When scrolling back through message output using
borPageUp, blank line separators are omitted. Preserve those empty lines in message scrollback.Commit message
fixes: #21315
closes: #21444
AI assistance
OpenAI Codex assisted investigation, code/test changes, and validation. Antigravity Gemini 3.8 Flash drafted the PR title and description.
Checklist
Signed-off-by:trailer is present (git commit -s), recommended but not requiredruntime/doc/was updated, or no update is neededAnything reviewers should know
Visible Behavior:
Trailing empty lines are retained by
Gat the more-prompt andg<after Enter, matching the original screen display.Reproduction and Test Coverage:
Test_message_scrollback_empty_lines: Original screendump test covers 1, 2, and 3 newline separators withf/bandPageDown/PageUp.Test_message_scrollback_trailing_empty_lines: New test checks exact terminal line output forGat the more-prompt and subsequentg<after Enter across 0 through 3 trailing newlines (0 serves as a boundary control).Test_echo_verbose_system: Covers themsg_sb_eol()guard against extra blank lines (not the separator loop).src/message.ccausesTest_message_scrollback_empty_linesandTest_message_scrollback_trailing_empty_linesto fail. Reverting only themsg_sb_eol()change causesTest_echo_verbose_systemto fail while the separator loop continues to pass.Validation Details:
make -C src/testdir test_messages test_cmdline test_normal test_terminal codestylevia PTY (on Linux as a non-root user); all target suites passed on both platforms.Test_echo_verbose_systemis skipped on macOS per its existingCheckNotMacguard, but executes and passes on Linux).git diff --checkis clean.