This commit is contained in:
Dylan Hurd
2026-02-15 18:19:22 -08:00
parent baea2bc304
commit 5495bf97d2
5 changed files with 28 additions and 12 deletions

View File

@@ -805,7 +805,7 @@ impl ChatComposer {
collaboration_mode_indicator_line(self.collaboration_mode_indicator, show_cycle_hint)
{
if !spans.is_empty() {
spans.push(" | ".dim().into());
spans.push(" | ".dim());
}
spans.extend(collab.spans);
}
@@ -820,7 +820,7 @@ impl ChatComposer {
let mut line =
context_window_line(self.context_window_percent, self.context_window_used_tokens);
if let Some(vim_mode) = self.vim_mode_indicator_span() {
line.spans.push(" | ".dim().into());
line.spans.push(" | ".dim());
line.spans.push(vim_mode);
}
line
@@ -4440,7 +4440,7 @@ mod tests {
assert!(composer.textarea.is_vim_enabled());
assert_eq!(
composer.vim_mode_indicator_span(),
Some("Vim: Normal".yellow())
Some("Vim: Normal".magenta())
);
composer.handle_key_event(KeyEvent::new(KeyCode::Char('i'), KeyModifiers::NONE));
@@ -4485,7 +4485,7 @@ mod tests {
composer.handle_key_event(KeyEvent::new(KeyCode::Esc, KeyModifiers::NONE));
assert_eq!(
composer.vim_mode_indicator_span(),
Some("Vim: Normal".yellow())
Some("Vim: Normal".magenta())
);
}

View File

@@ -0,0 +1,14 @@
---
source: tui/src/bottom_pane/chat_composer.rs
assertion_line: 4027
expression: terminal.backend()
---
" "
" Ask Codex to do anything "
" "
" "
" "
" "
" "
" "
" esc esc to edit previous message 100% context left "

View File

@@ -0,0 +1,6 @@
---
source: tui/src/bottom_pane/footer.rs
assertion_line: 1179
expression: terminal.backend()
---
" esc again to edit previous message 100% context left "

View File

@@ -569,11 +569,10 @@ impl TextArea {
}
fn handle_vim_normal(&mut self, event: KeyEvent) {
if let Some(op) = self.vim_operator.take() {
if self.handle_vim_operator(op, event) {
if let Some(op) = self.vim_operator.take()
&& self.handle_vim_operator(op, event) {
return;
}
}
match event {
KeyEvent {

View File

@@ -123,11 +123,8 @@ impl ComposerInput {
}
fn handle_slash_command(&mut self, cmd: SlashCommand) {
match cmd {
SlashCommand::Vim => {
self.inner.toggle_vim_enabled();
}
_ => {}
if cmd == SlashCommand::Vim {
self.inner.toggle_vim_enabled();
}
}