Skip to content

Fix chat prompt partly covered by the mode line - #330

Merged
ericdallo merged 2 commits into
editor-code-assistant:masterfrom
shohi:fix/chat-prompt-visibility
Oct 20, 2026
Merged

ericdallo merged 2 commits into
editor-code-assistant:masterfrom
shohi:fix/chat-prompt-visibility

Conversation

@shohi

@shohi shohi commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Keep the end of a multiline prompt visible while assistant output streams in, without moving the cursor.
  • Leave the view alone when the user is reading earlier chat content.
  • Add tests for the scroll and no-scroll cases.

@shohi
shohi force-pushed the fix/chat-prompt-visibility branch 4 times, most recently from aed1d74 to 806ac13 Compare September 29, 2026 03:28
@shohi shohi changed the title Keep chat input visible as it wraps and streams Fix chat prompt partly covered by the mode line Sep 29, 2026
@shohi
shohi force-pushed the fix/chat-prompt-visibility branch from 806ac13 to 68d0a25 Compare October 8, 2026 23:57
@ericdallo

Copy link
Copy Markdown
Member

@shohi can you explain how can I repro the issue you were having?

@shohi

shohi commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@ericdallo The issue is that a multiline prompt can become partly hidden behind the mode line. There are two ways to reproduce it on the version before this PR:

While typing

  • Open a chat with enough history that the prompt is near the bottom.
  • Type text and press Shift+Return several times, or paste a long line that wraps.
  • The last prompt line can become partly hidden behind the mode line.

While streaming

  • Ask ECA for a long response.
  • While it streams, type a multiline prompt for your next message.
  • Move the cursor to the first prompt line, keeping the prompt near the bottom of the window.
  • Let output continue arriving. Prompt lines below the cursor can disappear below the window.

In both cases, I expect the window to scroll enough to keep the prompt end fully visible without moving the cursor. That is what this PR fixes.

@shohi
shohi force-pushed the fix/chat-prompt-visibility branch from 68d0a25 to 0cbe069 Compare October 14, 2026 01:01
@ericdallo

Copy link
Copy Markdown
Member

@shohi I still can't repro that
recording-2026-10-15 13 05 21

Any chance this is related with your config or your modeline?

@shohi
shohi force-pushed the fix/chat-prompt-visibility branch 2 times, most recently from f1afd8d to 0ceb6cd Compare October 15, 2026 23:30
Streamed text is inserted above the prompt and pushes it down.
Redisplay only keeps the line of point visible, so when point sits
on an early line of a multiline prompt, the lines below it slide
under the mode line.

When point is in the prompt and the bottom of the chat is shown,
scroll just enough to show the end of the prompt again, without
moving point. Nothing scrolls while the user reads earlier content.
@shohi
shohi force-pushed the fix/chat-prompt-visibility branch from 0ceb6cd to b4fee8f Compare October 15, 2026 23:49
@shohi

shohi commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

@ericdallo Thanks for trying it. You were right about the config: the typing case came from my pixel-scroll-precision-mode, so I removed that part and narrowed the PR to the streaming case.

Demo recorded with emacs -Q (no user config). The server API is stubbed and 10 lines are fed through eca-chat--stream-buffered-text / eca-chat--stream-flush, the same path real assistant text takes. I also reproduced it with real agent output. Point is on the first line of a 3-line prompt.

Here is a demo before and after the fix:

sbs

@ericdallo ericdallo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks this looks good

@ericdallo
ericdallo merged commit 0767ccf into editor-code-assistant:master Oct 20, 2026
15 checks passed
@shohi
shohi deleted the fix/chat-prompt-visibility branch October 25, 2026 03:21
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.

2 participants