fix(tui): Enter 提交文本,不再换行
OpenTUI textarea 多行模式下 Enter 默认换行,改为拦截 Enter 调用 submitPrompt() 提交。这是一个命令提示符输入框,不需要多行。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -349,6 +349,12 @@ function AirCodingView(props: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event.name === 'return') {
|
||||||
|
event.preventDefault()
|
||||||
|
submitPrompt()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (event.ctrl && event.name === 'c') {
|
if (event.ctrl && event.name === 'c') {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
if (textarea && !textarea.isDestroyed && textarea.plainText.length > 0) {
|
if (textarea && !textarea.isDestroyed && textarea.plainText.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user