fix: dfeat: command parameters

This commit is contained in:
2026-02-28 17:15:41 +08:00
parent 91d46dea75
commit 28066c7fff
3 changed files with 161 additions and 27 deletions
+12
View File
@@ -40,6 +40,18 @@ customElement<MdCommanderProps>(
}
}
// 补全未打开时,使用上下键浏览历史
if (e.key === "ArrowUp" && !commander.showCompletions()) {
e.preventDefault();
commander.navigateHistory("up");
return;
}
if (e.key === "ArrowDown" && !commander.showCompletions()) {
e.preventDefault();
commander.navigateHistory("down");
return;
}
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
commander.handleCommand();