moved key sequences also
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// src/config/binds.rs
|
||||
|
||||
pub mod config;
|
||||
pub mod key_sequences;
|
||||
|
||||
pub use config::*;
|
||||
pub use key_sequences::*;
|
||||
|
||||
@@ -355,13 +355,13 @@ impl Config {
|
||||
|
||||
// Get string representations of the sequence
|
||||
let sequence_str = sequence.iter()
|
||||
.map(|k| crate::config::key_sequences::key_to_string(k))
|
||||
.map(|k| crate::config::binds::key_sequences::key_to_string(k))
|
||||
.collect::<Vec<String>>()
|
||||
.join("");
|
||||
|
||||
// Add the missing sequence_plus definition
|
||||
let sequence_plus = sequence.iter()
|
||||
.map(|k| crate::config::key_sequences::key_to_string(k))
|
||||
.map(|k| crate::config::binds::key_sequences::key_to_string(k))
|
||||
.collect::<Vec<String>>()
|
||||
.join("+");
|
||||
|
||||
@@ -414,7 +414,7 @@ impl Config {
|
||||
// Special case for + format in bindings
|
||||
if binding.contains('+') {
|
||||
let normalized_sequence = sequence.iter()
|
||||
.map(|k| crate::config::key_sequences::key_to_string(k))
|
||||
.map(|k| crate::config::binds::key_sequences::key_to_string(k))
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
let binding_parts: Vec<&str> = binding.split('+').collect();
|
||||
@@ -442,7 +442,7 @@ impl Config {
|
||||
|
||||
// Get string representation of the sequence
|
||||
let sequence_str = sequence.iter()
|
||||
.map(|k| crate::config::key_sequences::key_to_string(k))
|
||||
.map(|k| crate::config::binds::key_sequences::key_to_string(k))
|
||||
.collect::<Vec<String>>()
|
||||
.join("");
|
||||
|
||||
@@ -491,7 +491,7 @@ impl Config {
|
||||
if binding.contains('+') {
|
||||
let binding_parts: Vec<&str> = binding.split('+').collect();
|
||||
let sequence_parts = sequence.iter()
|
||||
.map(|k| crate::config::key_sequences::key_to_string(k))
|
||||
.map(|k| crate::config::binds::key_sequences::key_to_string(k))
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
if binding_parts.len() > sequence_parts.len() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// src/config/mod.rs
|
||||
pub mod key_sequences;
|
||||
|
||||
pub mod binds;
|
||||
pub mod colors;
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::config::binds::config::Config;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
use crate::ui::handlers::rat_state::UiStateHandler;
|
||||
use crate::modes::handlers::{edit, command_mode, read_only};
|
||||
use crate::config::key_sequences::KeySequenceTracker;
|
||||
use crate::config::binds::key_sequences::KeySequenceTracker;
|
||||
use super::common;
|
||||
|
||||
pub struct EventHandler {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
use crossterm::event::{KeyEvent};
|
||||
use crate::config::binds::config::Config;
|
||||
use crate::ui::handlers::form::FormState;
|
||||
use crate::config::key_sequences::KeySequenceTracker;
|
||||
use crate::config::binds::key_sequences::KeySequenceTracker;
|
||||
use crate::tui::terminal::grpc_client::GrpcClient;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user