mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
Fix shift+return in vscode. (#12799)
This commit is contained in:
committed by
GitHub
parent
9e4ae214a8
commit
fd59d9dd92
@@ -105,6 +105,21 @@ describe('KeypressContext', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should handle backslash return', async () => {
|
||||||
|
const { keyHandler } = setupKeypressTest();
|
||||||
|
|
||||||
|
act(() => stdin.write('\\\r'));
|
||||||
|
|
||||||
|
expect(keyHandler).toHaveBeenCalledWith(
|
||||||
|
expect.objectContaining({
|
||||||
|
name: 'return',
|
||||||
|
ctrl: false,
|
||||||
|
meta: false,
|
||||||
|
shift: true,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it.each([
|
it.each([
|
||||||
{
|
{
|
||||||
modifier: 'Shift',
|
modifier: 'Shift',
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ function bufferBackslashEnter(
|
|||||||
|
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
continue;
|
continue;
|
||||||
} else if (key.name !== '\\') {
|
} else if (key.sequence !== '\\') {
|
||||||
keypressHandler(key);
|
keypressHandler(key);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ function bufferBackslashEnter(
|
|||||||
keypressHandler(key);
|
keypressHandler(key);
|
||||||
} else if (nextKey.name === 'return') {
|
} else if (nextKey.name === 'return') {
|
||||||
keypressHandler({
|
keypressHandler({
|
||||||
...key,
|
...nextKey,
|
||||||
shift: true,
|
shift: true,
|
||||||
sequence: '\r', // Corrected escaping for newline
|
sequence: '\r', // Corrected escaping for newline
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user