normal escape stop inspecting
This commit is contained in:
@@ -190,6 +190,8 @@ pub enum BufferAction {
|
||||
|
||||
InspectSelection,
|
||||
InspectSelectionColor,
|
||||
|
||||
StopInspecting,
|
||||
}
|
||||
|
||||
impl BufferAction {
|
||||
@@ -264,6 +266,8 @@ impl BufferAction {
|
||||
|
||||
InspectSelection => true,
|
||||
InspectSelectionColor => true,
|
||||
|
||||
StopInspecting => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -339,6 +343,8 @@ impl From<BufferAction> for &str {
|
||||
|
||||
InspectSelection => "inspect_selection",
|
||||
InspectSelectionColor => "inspect_selection_color",
|
||||
|
||||
StopInspecting => "stop_inspecting",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -423,6 +429,8 @@ impl TryFrom<&str> for BufferAction {
|
||||
"inspect_selection" => Ok(InspectSelection),
|
||||
"inspect_selection_color" => Ok(InspectSelectionColor),
|
||||
|
||||
"stop_inspecting" => Ok(StopInspecting),
|
||||
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ impl Buffer {
|
||||
|
||||
BufferAction::InspectSelection => self.inspect_selection(),
|
||||
BufferAction::InspectSelectionColor => self.inspect_selection_color(),
|
||||
|
||||
BufferAction::StopInspecting => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@ impl Default for Config {
|
||||
|
||||
(keypress("C- "), InspectSelection.into()),
|
||||
(keypress("A- "), InspectSelectionColor.into()),
|
||||
|
||||
(keypress("escape"), StopInspecting.into()),
|
||||
].into()),
|
||||
(Some(PartialAction::Goto), [
|
||||
(keypress("j"), GotoLineStart.into()),
|
||||
|
||||
Reference in New Issue
Block a user