Skip to content

Merge the ClickHouse history recall changes into master, fix Ctrl-V blocking - #46

Merged
alexey-milovidov merged 6 commits into
masterfrom
clickhouse/history-recalled-hints-master
Oct 13, 2026
Merged

alexey-milovidov merged 6 commits into
masterfrom
clickhouse/history-recalled-hints-master

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Merges the ClickHouse line of replxx into master, so that the commit used by ClickHouse is part of master again.

ClickHouse pins replxx at 4ab25d4, on the clickhouse/history-recalled-hints-fix branch. That branch has four commits that are not in master:

  • 2660e50 Expose accepted history recalls
  • 54e60fe Fix accepted history recall tracking
  • 9edc46b Track history restore recalls
  • 4ab25d4 Invalidate the hint cache when preloading a buffer

ClickHouse uses Replxx::history_recalled from these commits, so it cannot build against master without them.

This PR has:

  1. A merge of master into that line. The conflicts were only in bind_key, bind_key_internal and history_recalled, where the editing modes added a mode parameter.
  2. A fix for a regression from the esc delay support (ef93b95). read_unicode_character now waits for input with poll, so the non-blocking descriptor no longer stops read_verbatim: after Ctrl-V, the editor kept waiting for further key presses until its buffer was full, and the line editor appeared stuck. A negative delay now means "do not wait", and read_verbatim uses it for the characters after the first one.

I checked it with ClickHouse: the build passes, Ctrl-V works again in clickhouse local, and the interactive client tests pass (68 of 70 .expect tests; the other two need a disk from the CI test configuration and do not involve the line editor).

ClickHouse PRs that pin the result:

Please merge this with a merge commit (not squash or rebase), so that the commit pinned by ClickHouse stays reachable from master.

🤖 Generated with Claude Code

alexey-milovidov and others added 6 commits August 18, 2026 10:26
The hint cache survives across prompts and is keyed on the line text, so a
preloaded line that is byte-for-byte equal to the previously displayed one
would reuse the stale cache without invoking the hint callback.
…recalled-hints-master

# Conflicts:
#	src/replxx.cxx
#	src/replxx_impl.cxx
#	src/replxx_impl.hxx
Since `read_unicode_character` waits for input with `poll`, making the descriptor
non-blocking no longer stops `read_verbatim` when there is no more input: after
Ctrl-V it kept waiting for further key presses until the buffer was full.

A negative delay now means "do not wait", and `read_verbatim` uses it for the
characters after the first one.

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 the shared terminal state. 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#44
Related: ClickHouse/replxx#46

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>
@azat

azat commented Oct 13, 2026

Copy link
Copy Markdown
Member

@alexey-milovidov can you please merge all PRs that you need for replxx, update the contrib in ClickHouse, otherwise they are out of sync and it is hard to submit other fixes on top

Once it will be done, I will finish mine - #47

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok.

@alexey-milovidov alexey-milovidov self-assigned this Oct 13, 2026
@alexey-milovidov
alexey-milovidov merged commit 77ea5a2 into master Oct 13, 2026
1 check failed
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