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:
@@ -24,8 +24,8 @@ file-search *args:
|
||||
fmt:
|
||||
cargo fmt -- --config imports_granularity=Item
|
||||
|
||||
fix:
|
||||
cargo clippy --fix --all-features --tests --allow-dirty
|
||||
fix *args:
|
||||
cargo clippy --fix --all-features --tests --allow-dirty "$@"
|
||||
|
||||
install:
|
||||
rustup show active-toolchain
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user