Skip to content

Commit 208a988

Browse files
committed
fix(ui): 修复搜索查询中回车键的处理逻辑
- 在处理搜索输入时忽略回车键,避免错误触发搜索操作 - 增加对回车键的判断,提升输入处理的准确性 - 防止命名键在输入查询时误触发逻辑分支
1 parent db6f0c6 commit 208a988

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ui/SessionList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export function SessionList({ sessions, onSelect, onCancel }: Props): React.Reac
105105
}
106106

107107
// Printable character: append to search query
108-
if (input && input.length > 0 && !key.meta && !key.ctrl && !key.tab) {
108+
if (input && input.length > 0 && !key.meta && !key.ctrl && !key.tab && !key.return) {
109109
// Ignore if it's a named key that happens to have input (safety check)
110110
if (key.upArrow || key.downArrow || key.leftArrow || key.rightArrow) {
111111
return;

0 commit comments

Comments
 (0)