compiled
This commit is contained in:
@@ -143,7 +143,6 @@ impl EventHandler {
|
||||
return read_only::handle_read_only_event(
|
||||
key,
|
||||
config,
|
||||
form_state,
|
||||
&mut self.key_sequence_tracker,
|
||||
current_position,
|
||||
total_count,
|
||||
@@ -151,6 +150,7 @@ impl EventHandler {
|
||||
&mut self.command_message,
|
||||
&mut self.edit_mode_cooldown,
|
||||
&mut self.ideal_cursor_column,
|
||||
form_state,
|
||||
).await;
|
||||
},
|
||||
|
||||
|
||||
17
client/src/modes/handlers/read_only.rs
Normal file
17
client/src/modes/handlers/read_only.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
// src/modes/handlers/read_only.rs
|
||||
use async_trait::async_trait;
|
||||
use crate::tui::terminal::grpc_client::GrpcClient;
|
||||
|
||||
#[async_trait]
|
||||
pub trait ReadOnlyHandler {
|
||||
async fn handle_read_only_action(
|
||||
&mut self,
|
||||
action: &str,
|
||||
grpc_client: &mut GrpcClient,
|
||||
current_position: &mut u64,
|
||||
total_count: u64,
|
||||
) -> Result<String, Box<dyn std::error::Error>>;
|
||||
|
||||
// Add this method
|
||||
fn adjust_cursor_position(&mut self, ideal_column: &mut usize);
|
||||
}
|
||||
Reference in New Issue
Block a user