mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
do not toggle the setting item when entering space (#14489)
This commit is contained in:
@@ -466,20 +466,6 @@ describe('SettingsDialog', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should toggle setting with Space key', async () => {
|
|
||||||
const settings = createMockSettings();
|
|
||||||
const onSelect = vi.fn();
|
|
||||||
|
|
||||||
const { stdin, unmount } = renderDialog(settings, onSelect);
|
|
||||||
|
|
||||||
// Press Space to toggle current setting
|
|
||||||
act(() => {
|
|
||||||
stdin.write(' '); // Space key
|
|
||||||
});
|
|
||||||
|
|
||||||
unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should handle vim mode setting specially', async () => {
|
it('should handle vim mode setting specially', async () => {
|
||||||
const settings = createMockSettings();
|
const settings = createMockSettings();
|
||||||
const onSelect = vi.fn();
|
const onSelect = vi.fn();
|
||||||
|
|||||||
@@ -714,7 +714,7 @@ export function SettingsDialog({
|
|||||||
} else if (newIndex >= scrollOffset + effectiveMaxItemsToShow) {
|
} else if (newIndex >= scrollOffset + effectiveMaxItemsToShow) {
|
||||||
setScrollOffset(newIndex - effectiveMaxItemsToShow + 1);
|
setScrollOffset(newIndex - effectiveMaxItemsToShow + 1);
|
||||||
}
|
}
|
||||||
} else if (keyMatchers[Command.RETURN](key) || name === 'space') {
|
} else if (keyMatchers[Command.RETURN](key)) {
|
||||||
const currentItem = items[activeSettingIndex];
|
const currentItem = items[activeSettingIndex];
|
||||||
if (
|
if (
|
||||||
currentItem?.type === 'number' ||
|
currentItem?.type === 'number' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user