fix: message input
This commit is contained in:
parent
9de20396ce
commit
82a681bc84
1 changed files with 7 additions and 1 deletions
|
|
@ -57,7 +57,13 @@ export function EditMessageSelector({
|
|||
prev < userMessages.length - 1 ? prev + 1 : 0,
|
||||
);
|
||||
} else if (key.return) {
|
||||
// Start editing the selected message
|
||||
// Start editing the selected message - set cursor to end
|
||||
const content =
|
||||
typeof userMessages[selectedIndex]?.item.message.content === "string"
|
||||
? userMessages[selectedIndex].item.message.content
|
||||
: "";
|
||||
textBuffer.setCursor(content.length);
|
||||
setCursorPosition(content.length);
|
||||
setIsEditing(true);
|
||||
} else if (key.escape || (key.ctrl && input === "d")) {
|
||||
onExit();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue