Repository navigation
Handle Ctrl-Z in incremental history search through the key binding - #45
Merged
alexey-milovidov merged 1 commit intoOct 12, 2026
Merged
Conversation
The incremental history search had its own handling of Ctrl-Z with `raise( SIGSTOP )`, bypassing the key binding. When an application rebinds Ctrl-Z to disable suspending (e.g. when the line editor runs inside a server process serving a pseudoterminal), the search still stopped the process. Now Ctrl-Z leaves the search and is passed to the main loop, like other editing keys, so that it goes through the key binding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alexey-milovidov
added a commit
to ClickHouse/ClickHouse
that referenced
this pull request
Oct 12, 2026
`master` of `replxx` now contains the fix of Ctrl-Z in the incremental history search. The new commit merges it with the history recall changes used by ClickHouse and fixes Ctrl-V blocking after the esc delay support from `master`. Related: ClickHouse/replxx#45 Related: ClickHouse/replxx#46 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The incremental history search (Ctrl-R / Ctrl-S) handled Ctrl-Z itself with
raise( SIGSTOP ), bypassing the key binding. An application that rebinds Ctrl-Z to disable suspending still had the process stopped when the key was pressed during a search. In ClickHouse, the line editor runs inside the server process for client sessions embedded into the server (the web terminal and SSH), so Ctrl-R then Ctrl-Z stopped the whole server.Now Ctrl-Z leaves the search and goes to the main loop, like the other editing keys, so it goes through the key binding. With the default binding it still suspends, through the
suspendaction. That action is now the onlyraisecall, and it can only be reached through the binding.ClickHouse PR: ClickHouse/ClickHouse#125512
ClickHouse currently uses this change on top of the
clickhouse/history-recalled-hints-fixbranch (commit 00cd994, branchclickhouse/no-suspend-in-history-search). This PR has the same change cherry-picked ontomaster.🤖 Generated with Claude Code