Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/tui/src/tui/app/composer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ impl App {
self.selected_attachment_index = None;
return false;
};
self.clear_input_history_navigation();
let reference = references[index].clone();
let cursor_byte = byte_index_at_char(&self.input, self.cursor_position);
let new_cursor_byte = if cursor_byte <= reference.start_byte {
Expand Down Expand Up @@ -1446,6 +1447,7 @@ impl App {

/// Delete the character under the cursor (vim `x`).
pub fn vim_delete_char_under_cursor(&mut self) {
self.clear_input_history_navigation();
self.auto_expand_oversized_paste();
let total = char_count(&self.input);
if self.cursor_position >= total {
Expand All @@ -1466,6 +1468,7 @@ impl App {

/// Delete the entire current logical line (vim `dd`).
pub fn vim_delete_line(&mut self) {
self.clear_input_history_navigation();
let text = self.input.clone();
let cursor_byte = byte_index_at_char(&text, self.cursor_position);
let line_start_byte = text[..cursor_byte].rfind('\n').map_or(0, |idx| idx + 1);
Expand Down
Loading