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