normal escape stop inspecting

This commit is contained in:
alice pellerin
2026-05-16 16:25:47 -05:00
parent 906a152a21
commit 42a83b1245
4 changed files with 12 additions and 1 deletions
+8
View File
@@ -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(()),
} }
} }
+2
View File
@@ -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 => {},
} }
} }
+2
View File
@@ -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()),
-1
View File
@@ -1,6 +1,5 @@
# todo # todo
- v1.0 - v1.0
- `<escape>` dismiss inspectors
- `T` Till - `T` Till
- click on tab to go to buffer - click on tab to go to buffer
- `go` goto entered offset - `go` goto entered offset