implemented read command for ex mode
This commit is contained in:
@@ -203,7 +203,7 @@ fn dedupe_entries(entries: &[HistEntry]) -> Vec<HistEntry> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[derive(Default,Clone,Debug)]
|
||||
#[derive(Default, Clone, Debug)]
|
||||
pub struct History {
|
||||
path: PathBuf,
|
||||
pub pending: Option<LineBuf>, // command, cursor_pos
|
||||
@@ -215,7 +215,7 @@ pub struct History {
|
||||
//search_direction: Direction,
|
||||
ignore_dups: bool,
|
||||
max_size: Option<u32>,
|
||||
stateless: bool
|
||||
stateless: bool,
|
||||
}
|
||||
|
||||
impl History {
|
||||
@@ -231,7 +231,7 @@ impl History {
|
||||
//search_direction: Direction::Backward,
|
||||
ignore_dups: false,
|
||||
max_size: None,
|
||||
stateless: true,
|
||||
stateless: true,
|
||||
}
|
||||
}
|
||||
pub fn new() -> ShResult<Self> {
|
||||
@@ -269,7 +269,7 @@ impl History {
|
||||
//search_direction: Direction::Backward,
|
||||
ignore_dups,
|
||||
max_size,
|
||||
stateless: false,
|
||||
stateless: false,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -454,9 +454,9 @@ impl History {
|
||||
}
|
||||
|
||||
pub fn save(&mut self) -> ShResult<()> {
|
||||
if self.stateless {
|
||||
return Ok(());
|
||||
}
|
||||
if self.stateless {
|
||||
return Ok(());
|
||||
}
|
||||
let mut file = OpenOptions::new()
|
||||
.create(true)
|
||||
.append(true)
|
||||
|
||||
Reference in New Issue
Block a user