mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-29 07:21:27 -07:00
Support command/ctrl/alt backspace correctly (#17175)
This commit is contained in:
committed by
GitHub
parent
e894871afc
commit
f190b87223
@@ -53,7 +53,14 @@ describe('ShellInputPrompt', () => {
|
||||
const handler = mockUseKeypress.mock.calls[0][0];
|
||||
|
||||
// Simulate keypress
|
||||
handler({ name, sequence, ctrl: false, shift: false, meta: false });
|
||||
handler({
|
||||
name,
|
||||
shift: false,
|
||||
alt: false,
|
||||
ctrl: false,
|
||||
cmd: false,
|
||||
sequence,
|
||||
});
|
||||
|
||||
expect(mockWriteToPty).toHaveBeenCalledWith(1, sequence);
|
||||
});
|
||||
@@ -66,7 +73,7 @@ describe('ShellInputPrompt', () => {
|
||||
|
||||
const handler = mockUseKeypress.mock.calls[0][0];
|
||||
|
||||
handler({ name: key, ctrl: true, shift: true, meta: false });
|
||||
handler({ name: key, shift: true, alt: false, ctrl: true, cmd: false });
|
||||
|
||||
expect(mockScrollPty).toHaveBeenCalledWith(1, direction);
|
||||
});
|
||||
@@ -78,10 +85,11 @@ describe('ShellInputPrompt', () => {
|
||||
|
||||
handler({
|
||||
name: 'a',
|
||||
sequence: 'a',
|
||||
ctrl: false,
|
||||
shift: false,
|
||||
meta: false,
|
||||
alt: false,
|
||||
ctrl: false,
|
||||
cmd: false,
|
||||
sequence: 'a',
|
||||
});
|
||||
|
||||
expect(mockWriteToPty).not.toHaveBeenCalled();
|
||||
@@ -94,10 +102,11 @@ describe('ShellInputPrompt', () => {
|
||||
|
||||
handler({
|
||||
name: 'a',
|
||||
sequence: 'a',
|
||||
ctrl: false,
|
||||
shift: false,
|
||||
meta: false,
|
||||
alt: false,
|
||||
ctrl: false,
|
||||
cmd: false,
|
||||
sequence: 'a',
|
||||
});
|
||||
|
||||
expect(mockWriteToPty).not.toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user