🟡 [M13] 未检查 KeyEventKind,Press/Repeat/Release 全当命令处理 #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
文件:
tui/main.rs:39分类: 事件处理
问题: Crossterm 可发送 Press/Repeat/Release 事件,代码未过滤,导致单次按键触发重复滚动/切换/退出。
建议修复: 忽略非
KeyEventKind::Press事件,仅滚动键处理Repeat。修复方案: 在 handle_key 入口处统一过滤 KeyEventKind,新增 is_repeatable_key 方法。Release 全部忽略,Repeat 仅白名单键(滚动/导航)通过,Press 全部放行。Commit: 463c531,9个回归测试全部通过。