mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(tui): handle empty bracketed paste fallback (#15594)
This commit is contained in:
parent
5d2f9b5d7d
commit
124da27767
2 changed files with 3 additions and 3 deletions
|
|
@ -927,8 +927,8 @@ export function TextInput({
|
|||
} else {
|
||||
v = v.slice(0, c)
|
||||
}
|
||||
} else if (inp.length > 0) {
|
||||
const bracketed = inp.includes('[200~')
|
||||
} else if (event.keypress.isPasted || inp.length > 0) {
|
||||
const bracketed = event.keypress.isPasted || inp.includes('[200~')
|
||||
const text = inp.replace(BRACKET_PASTE, '').replace(/\r\n/g, '\n').replace(/\r/g, '\n')
|
||||
|
||||
if (bracketed && emitPaste({ bracketed: true, cursor: c, text, value: v })) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue