Skip to content

Keep the line-mode input while browsing history - #850

Merged
dakra merged 1 commit into
dakra:mainfrom
plopresti:line-mode-history-draft
Dec 1, 2026
Merged

dakra merged 1 commit into
dakra:mainfrom
plopresti:line-mode-history-draft

Conversation

@plopresti

Copy link
Copy Markdown
Contributor

Fixes #849.

A buffer-local ghostel--line-mode-history-draft takes the input when browsing starts (index
nil -> 0) and ghostel-line-mode-history-next restores it when the index goes back to nil.
M-n while not browsing is a no-op now; before, it emptied the input.

ghostel-test-line-mode-history covers the draft round trip and the no-op; it fails before
this change at the first new assertion.

M-p replaced the input with the history entry and kept no copy, and
M-n past the newest entry restored an empty input, as did M-n while
not browsing.  The input composed before M-p is now kept and comes
back past the newest entry, as in comint and readline, and M-n
outside of browsing leaves the input alone.

Fixes dakra#849
@dakra
dakra force-pushed the line-mode-history-draft branch from 8a7e396 to 052afff Compare December 1, 2026 09:09
@dakra
dakra merged commit 052afff into dakra:main Dec 1, 2026
26 checks passed
@dakra

dakra commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Thanks.

@plopresti

Copy link
Copy Markdown
Contributor Author

Thank you for ghostel and ghostel-tmux.

I went looking for a solution to remote interaction with CLI AI harnesses over high-latency links. It was a pleasant surprise to find that Emacs is the answer.

This branch was previously deployed

1 inactive deployment
github-pages — 052afff2 Deployed Dec 1, 2026 by dakra via deploy #300
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.

Line mode: M-p discards the input being composed

2 participants