mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
fix(cli): restore ? shortcuts in vim normal mode
This commit is contained in:
parent
3bce84d5da
commit
0be974b1d7
3 changed files with 53 additions and 0 deletions
|
|
@ -1300,6 +1300,23 @@ describe('InputPrompt', () => {
|
|||
expect(mockBuffer.handleInput).toHaveBeenCalled();
|
||||
unmount();
|
||||
});
|
||||
|
||||
it('should toggle shortcuts when vim passes through ? on an empty prompt', async () => {
|
||||
props.vimHandleInput = vi.fn().mockReturnValue(false);
|
||||
props.onToggleShortcuts = vi.fn();
|
||||
|
||||
const { stdin, unmount } = renderWithProviders(
|
||||
<InputPrompt {...props} />,
|
||||
);
|
||||
await wait();
|
||||
|
||||
stdin.write('?');
|
||||
await wait();
|
||||
|
||||
expect(props.vimHandleInput).toHaveBeenCalled();
|
||||
expect(props.onToggleShortcuts).toHaveBeenCalled();
|
||||
unmount();
|
||||
});
|
||||
});
|
||||
|
||||
describe('unfocused paste', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue