tui: tab-completing a command moves the cursor to the end (#2362)

also tweak agents.md for faster `just fix`
This commit is contained in:
Jeremy Rose
2025-08-20 09:57:55 -07:00
committed by GitHub
parent 0ad4e11c84
commit 8481eb4c6e
3 changed files with 8 additions and 3 deletions

View File

@@ -275,6 +275,11 @@ impl ChatComposer {
self.textarea.set_text(&format!("/{} ", cmd.command()));
self.textarea.set_cursor(self.textarea.text().len());
}
// After completing the command, move cursor to the end.
if !self.textarea.text().is_empty() {
let end = self.textarea.text().len();
self.textarea.set_cursor(end);
}
}
(InputResult::None, true)
}