🐛 fix(input): route Esc bindings through paste_now
Esc/chars keystroke sequences (e.g. Shift+Enter → ESC+CR for Claude Code multiline) are not clipboard pastes. paste() gates on \r/\n and would open the multi-line confirm modal; paste_now writes them through.
This commit is contained in:
1 parent
4b7389cc93
commit
7f5b79fb47
1 file changed
+4
-1
@@ -223,7 +223,10 @@ impl<T: EventListener> Execute<T> for Action {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn execute<A: ActionContext<T>>(&self, ctx: &mut A) {
|
fn execute<A: ActionContext<T>>(&self, ctx: &mut A) {
|
||||||
match self {
|
match self {
|
||||||
Action::Esc(s) => ctx.paste(s, false),
|
// Esc/chars bindings are keystroke sequences (e.g. Shift+Enter → ESC+CR for
|
||||||
|
// Claude Code multiline), not clipboard pastes. paste() gates on \r/\n and
|
||||||
|
// would pop the multi-line confirm modal, so write through paste_now.
|
||||||
|
Action::Esc(s) => ctx.paste_now(s, false),
|
||||||
Action::Command(program) => ctx.spawn_daemon(program.program(), program.args()),
|
Action::Command(program) => ctx.spawn_daemon(program.program(), program.args()),
|
||||||
Action::Hint(hint) => {
|
Action::Hint(hint) => {
|
||||||
ctx.display().hint_state.start(hint.clone());
|
ctx.display().hint_state.start(hint.clone());
|
||||||
|
|||||||
Reference in new issue
Block a user