summaryrefslogtreecommitdiffstats
path: root/src/verb/internal_focus.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2021-04-05 15:04:47 +0200
committerCanop <cano.petrole@gmail.com>2021-04-05 15:04:47 +0200
commit61911a7c39d44aa0cba70718afeca5084d26a889 (patch)
tree7c59f38b20ed8277996d65e1dc89349ddacf3dc9 /src/verb/internal_focus.rs
parent685836c7a465f992e6a4f2a3f4c2feca23df3403 (diff)
rename some types to bring them closer from their use
The AppState was named this way when there was only one panel. Now it's not the whole app state anymore.
Diffstat (limited to 'src/verb/internal_focus.rs')
-rw-r--r--src/verb/internal_focus.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/verb/internal_focus.rs b/src/verb/internal_focus.rs
index bd71715..9fbee13 100644
--- a/src/verb/internal_focus.rs
+++ b/src/verb/internal_focus.rs
@@ -21,7 +21,7 @@ pub fn on_path(
tree_options: TreeOptions,
in_new_panel: bool,
con: &AppContext,
-) -> AppStateCmdResult {
+) -> CmdResult {
if in_new_panel {
new_panel_on_path(
path,
@@ -41,9 +41,9 @@ pub fn new_state_on_path(
screen: Screen,
tree_options: TreeOptions,
con: &AppContext,
-) -> AppStateCmdResult {
+) -> CmdResult {
let path = path::closest_dir(&path);
- AppStateCmdResult::from_optional_state(
+ CmdResult::from_optional_state(
BrowserState::new(path, tree_options, screen, con, &Dam::unlimited()),
false,
)
@@ -56,10 +56,10 @@ pub fn new_panel_on_path(
purpose: PanelPurpose,
con: &AppContext,
direction: HDir,
-) -> AppStateCmdResult {
+) -> CmdResult {
if purpose.is_preview() {
let pattern = tree_options.pattern.tree_to_preview();
- AppStateCmdResult::NewPanel {
+ CmdResult::NewPanel {
state: Box::new(PreviewState::new(path, pattern, None, tree_options, con)),
purpose,
direction,
@@ -67,13 +67,13 @@ pub fn new_panel_on_path(
} else {
let path = path::closest_dir(&path);
match BrowserState::new(path, tree_options, screen, con, &Dam::unlimited()) {
- Ok(Some(os)) => AppStateCmdResult::NewPanel {
+ Ok(Some(os)) => CmdResult::NewPanel {
state: Box::new(os),
purpose,
direction,
},
- Ok(None) => AppStateCmdResult::Keep, // this isn't supposed to happen
- Err(e) => AppStateCmdResult::DisplayError(e.to_string()),
+ Ok(None) => CmdResult::Keep, // this isn't supposed to happen
+ Err(e) => CmdResult::DisplayError(e.to_string()),
}
}
}
@@ -88,7 +88,7 @@ pub fn on_internal(
screen: Screen,
con: &AppContext,
tree_options: TreeOptions,
-) -> AppStateCmdResult {
+) -> CmdResult {
if let Some(arg) = &internal_exec.arg {
// the internal_execution specifies the path to use
// (it may come from a configured verb whose execution is