test(tui): tighten redraw hotkey review follow-ups
Use explicit repaint patch semantics for Ctrl/Cmd+L and narrow the hotkey assertion to the actual +L entry so unrelated descriptions do not cause false failures.
This commit is contained in:
@@ -27,8 +27,9 @@ describe('constants', () => {
|
||||
})
|
||||
|
||||
it('documents Ctrl/Cmd+L as non-destructive redraw', () => {
|
||||
expect(HOTKEYS.some(([, d]) => d === 'redraw / repaint')).toBe(true)
|
||||
expect(HOTKEYS.some(([, d]) => d.includes('new session'))).toBe(false)
|
||||
const hotkey = HOTKEYS.find(([k]) => k.endsWith('+L'))
|
||||
expect(hotkey).toBeDefined()
|
||||
expect(hotkey?.[1]).toBe('redraw / repaint')
|
||||
})
|
||||
|
||||
it('TOOL_VERBS maps known tools (verb-only, no emoji)', () => {
|
||||
|
||||
@@ -381,7 +381,7 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult {
|
||||
if (isAction(key, ch, 'l')) {
|
||||
clearSelection()
|
||||
|
||||
return patchUiState(state => ({ ...state }))
|
||||
return patchUiState({})
|
||||
}
|
||||
|
||||
if (isVoiceToggleKey(key, ch)) {
|
||||
|
||||
Reference in New Issue
Block a user