No need to "Refresh" explicitly

Closes: https://github.com/sayanarijit/xplr/issues/207
pull/217/head
Arijit Basu 3 years ago committed by Arijit Basu
parent 81854b9323
commit 7de0811eaf

@ -961,27 +961,25 @@ impl ExplorerConfig {
pub enum ExternalMsg { pub enum ExternalMsg {
/// Explore the present working directory and register the filtered nodes. /// Explore the present working directory and register the filtered nodes.
/// This operation is expensive. So, try to avoid using it too often. /// This operation is expensive. So, try to avoid using it too often.
/// Once exploration is done, it will auto `Refresh` the state.
ExplorePwd, ExplorePwd,
/// Explore the present working directory and register the filtered nodes asynchronously. /// Explore the present working directory and register the filtered nodes asynchronously.
/// This operation happens asynchronously. That means, the xplr directory buffers won't be updated /// This operation happens asynchronously. That means, the xplr directory buffers won't be updated
/// immediately. Hence, it needs to be used with care and probably with special checks in place. /// immediately. Hence, it needs to be used with care and probably with special checks in place.
/// To explore `$PWD` synchronously, use `ExplorePwd` instead. /// To explore `$PWD` synchronously, use `ExplorePwd` instead.
/// Once exploration is done, it will auto `Refresh` the state.
ExplorePwdAsync, ExplorePwdAsync,
/// Explore the present working directory along with its parents and register the filtered nodes. /// Explore the present working directory along with its parents and register the filtered nodes.
/// This operation happens asynchronously. That means, the xplr directory buffers won't be updated /// This operation happens asynchronously. That means, the xplr directory buffers won't be updated
/// immediately. Hence, it needs to be used with care and probably with special checks in place. /// immediately. Hence, it needs to be used with care and probably with special checks in place.
/// To explore just the `$PWD` synchronously, use `ExplorePwd` instead. /// To explore just the `$PWD` synchronously, use `ExplorePwd` instead.
/// Once exploration is done, it will auto `Refresh` the state.
ExploreParentsAsync, ExploreParentsAsync,
/// Refresh the app state (uncluding UI). /// Refresh the UI.
/// But it will not re-explore the directory if the working directory is the same. /// But it will not re-explore the directory if the working directory is the same.
/// If there is some change in the working directory and you want to re-explore it, /// If there is some change in the working directory and you want to re-explore it,
/// use the `Explore` message instead. /// use the `Explore` message instead.
/// Also, it will not clear the screen. Use `ClearScreen` for that.
Refresh, Refresh,
/// Clears the screen. /// Clears the screen.
@ -1105,7 +1103,6 @@ pub enum ExternalMsg {
PopMode, PopMode,
/// Switch layout. /// Switch layout.
/// This will call `Refresh` automatically.
/// ///
/// > **NOTE:** To be specific about which layout to switch to, use `SwitchLayoutBuiltin` or /// > **NOTE:** To be specific about which layout to switch to, use `SwitchLayoutBuiltin` or
/// `SwitchLayoutCustom` instead. /// `SwitchLayoutCustom` instead.
@ -1114,13 +1111,11 @@ pub enum ExternalMsg {
SwitchLayout(String), SwitchLayout(String),
/// Switch to a builtin layout. /// Switch to a builtin layout.
/// This will call `Refresh` automatically.
/// ///
/// **Example:** `SwitchLayoutBuiltin: default` /// **Example:** `SwitchLayoutBuiltin: default`
SwitchLayoutBuiltin(String), SwitchLayoutBuiltin(String),
/// Switch to a custom layout. /// Switch to a custom layout.
/// This will call `Refresh` automatically.
/// ///
/// **Example:** `SwitchLayoutCustom: my_custom_layout` /// **Example:** `SwitchLayoutCustom: my_custom_layout`
SwitchLayoutCustom(String), SwitchLayoutCustom(String),
@ -1129,7 +1124,7 @@ pub enum ExternalMsg {
/// Note that the arguments will be shell-escaped. /// Note that the arguments will be shell-escaped.
/// So to read the variables, the `-c` option of the shell /// So to read the variables, the `-c` option of the shell
/// can be used. /// can be used.
/// You may need to pass `Refresh` or `Explore` depening on the expectation. /// You may need to pass `ExplorePwd` depening on the expectation.
/// ///
/// **Example:** `Call: {command: bash, args: ["-c", "read -p test"]}` /// **Example:** `Call: {command: bash, args: ["-c", "read -p test"]}`
Call(Command), Call(Command),
@ -1613,10 +1608,11 @@ impl App {
} }
pub fn handle_task(self, task: Task) -> Result<Self> { pub fn handle_task(self, task: Task) -> Result<Self> {
match task.msg { let app = match task.msg {
MsgIn::Internal(msg) => self.handle_internal(msg), MsgIn::Internal(msg) => self.handle_internal(msg)?,
MsgIn::External(msg) => self.handle_external(msg, task.key), MsgIn::External(msg) => self.handle_external(msg, task.key)?,
} };
app.refresh()
} }
fn handle_internal(self, msg: InternalMsg) -> Result<Self> { fn handle_internal(self, msg: InternalMsg) -> Result<Self> {
@ -1752,7 +1748,6 @@ impl App {
ExternalMsg::LogWarning( ExternalMsg::LogWarning(
"Key map not found. Let's calm down, escape, and try again.".into(), "Key map not found. Let's calm down, escape, and try again.".into(),
), ),
ExternalMsg::Refresh,
] ]
}); });
@ -1808,10 +1803,8 @@ impl App {
self.history = history.push(n.absolute_path().clone()) self.history = history.push(n.absolute_path().clone())
} }
} }
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_last(mut self) -> Result<Self> { fn focus_last(mut self) -> Result<Self> {
@ -1826,19 +1819,15 @@ impl App {
if let Some(n) = dir.focused_node() { if let Some(n) = dir.focused_node() {
self.history = history.push(n.absolute_path().clone()); self.history = history.push(n.absolute_path().clone());
} }
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_previous(mut self) -> Result<Self> { fn focus_previous(mut self) -> Result<Self> {
if let Some(dir) = self.directory_buffer_mut() { if let Some(dir) = self.directory_buffer_mut() {
dir.focus = dir.focus.max(1) - 1; dir.focus = dir.focus.max(1) - 1;
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_previous_by_relative_index(mut self, index: usize) -> Result<Self> { fn focus_previous_by_relative_index(mut self, index: usize) -> Result<Self> {
@ -1852,10 +1841,8 @@ impl App {
if let Some(n) = self.focused_node() { if let Some(n) = self.focused_node() {
self.history = history.push(n.absolute_path().clone()); self.history = history.push(n.absolute_path().clone());
} }
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_previous_by_relative_index_from_input(self) -> Result<Self> { fn focus_previous_by_relative_index_from_input(self) -> Result<Self> {
@ -1869,10 +1856,8 @@ impl App {
fn focus_next(mut self) -> Result<Self> { fn focus_next(mut self) -> Result<Self> {
if let Some(dir) = self.directory_buffer_mut() { if let Some(dir) = self.directory_buffer_mut() {
dir.focus = (dir.focus + 1).min(dir.total.max(1) - 1); dir.focus = (dir.focus + 1).min(dir.total.max(1) - 1);
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_next_by_relative_index(mut self, index: usize) -> Result<Self> { fn focus_next_by_relative_index(mut self, index: usize) -> Result<Self> {
@ -1886,10 +1871,8 @@ impl App {
if let Some(n) = self.focused_node() { if let Some(n) = self.focused_node() {
self.history = history.push(n.absolute_path().clone()); self.history = history.push(n.absolute_path().clone());
} }
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_next_by_relative_index_from_input(self) -> Result<Self> { fn focus_next_by_relative_index_from_input(self) -> Result<Self> {
@ -1966,7 +1949,7 @@ impl App {
.map(|s| self.clone().change_directory(s, false)) .map(|s| self.clone().change_directory(s, false))
.unwrap_or(Ok(self)) .unwrap_or(Ok(self))
} else { } else {
self.clone().focus_path(target, false)?.refresh() self.clone().focus_path(target, false)
} }
} else { } else {
Ok(self) Ok(self)
@ -1980,7 +1963,7 @@ impl App {
self.input_buffer = Some(input.to_owned()); self.input_buffer = Some(input.to_owned());
}; };
self.logs_hidden = true; self.logs_hidden = true;
self.refresh() Ok(self)
} }
fn buffer_input_from_key(self, key: Option<Key>) -> Result<Self> { fn buffer_input_from_key(self, key: Option<Key>) -> Result<Self> {
@ -1994,7 +1977,7 @@ impl App {
fn set_input_buffer(mut self, string: String) -> Result<Self> { fn set_input_buffer(mut self, string: String) -> Result<Self> {
self.input_buffer = Some(string); self.input_buffer = Some(string);
self.logs_hidden = true; self.logs_hidden = true;
self.refresh() Ok(self)
} }
fn remove_input_buffer_last_character(mut self) -> Result<Self> { fn remove_input_buffer_last_character(mut self) -> Result<Self> {
@ -2002,10 +1985,8 @@ impl App {
buf.pop(); buf.pop();
self.input_buffer = Some(buf); self.input_buffer = Some(buf);
self.logs_hidden = true; self.logs_hidden = true;
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn remove_input_buffer_last_word(mut self) -> Result<Self> { fn remove_input_buffer_last_word(mut self) -> Result<Self> {
@ -2023,15 +2004,13 @@ impl App {
self.input_buffer = Some(buf); self.input_buffer = Some(buf);
self.logs_hidden = true; self.logs_hidden = true;
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn reset_input_buffer(mut self) -> Result<Self> { fn reset_input_buffer(mut self) -> Result<Self> {
self.input_buffer = None; self.input_buffer = None;
self.refresh() Ok(self)
} }
fn focus_by_index(mut self, index: usize) -> Result<Self> { fn focus_by_index(mut self, index: usize) -> Result<Self> {
@ -2041,10 +2020,8 @@ impl App {
if let Some(n) = self.focused_node() { if let Some(n) = self.focused_node() {
self.history = history.push(n.absolute_path().clone()); self.history = history.push(n.absolute_path().clone());
} }
self.refresh() };
} else { Ok(self)
Ok(self)
}
} }
fn focus_by_index_from_input(self) -> Result<Self> { fn focus_by_index_from_input(self) -> Result<Self> {
@ -2077,7 +2054,7 @@ impl App {
self.history = history.push(n.absolute_path().clone()); self.history = history.push(n.absolute_path().clone());
} }
} }
self.refresh() Ok(self)
} else { } else {
self.log_error(format!("{} not found in $PWD", name)) self.log_error(format!("{} not found in $PWD", name))
} }
@ -2171,7 +2148,7 @@ impl App {
fn switch_layout(mut self, layout: &str) -> Result<Self> { fn switch_layout(mut self, layout: &str) -> Result<Self> {
if let Some(l) = self.config().layouts().get(layout) { if let Some(l) = self.config().layouts().get(layout) {
self.layout = l.to_owned(); self.layout = l.to_owned();
self.refresh() Ok(self)
} else { } else {
self.log_error(format!("Layout not found: {}", layout)) self.log_error(format!("Layout not found: {}", layout))
} }
@ -2180,7 +2157,7 @@ impl App {
fn switch_layout_builtin(mut self, layout: &str) -> Result<Self> { fn switch_layout_builtin(mut self, layout: &str) -> Result<Self> {
if let Some(l) = self.config().layouts().get_builtin(layout) { if let Some(l) = self.config().layouts().get_builtin(layout) {
self.layout = l.to_owned(); self.layout = l.to_owned();
self.refresh() Ok(self)
} else { } else {
self.log_error(format!("Builtin layout not found: {}", layout)) self.log_error(format!("Builtin layout not found: {}", layout))
} }
@ -2189,7 +2166,7 @@ impl App {
fn switch_layout_custom(mut self, layout: &str) -> Result<Self> { fn switch_layout_custom(mut self, layout: &str) -> Result<Self> {
if let Some(l) = self.config().layouts().get_custom(layout) { if let Some(l) = self.config().layouts().get_custom(layout) {
self.layout = l.to_owned(); self.layout = l.to_owned();
self.refresh() Ok(self)
} else { } else {
self.log_error(format!("Custom layout not found: {}", layout)) self.log_error(format!("Custom layout not found: {}", layout))
} }
@ -2235,13 +2212,13 @@ impl App {
pub fn add_directory(mut self, parent: String, dir: DirectoryBuffer) -> Result<Self> { pub fn add_directory(mut self, parent: String, dir: DirectoryBuffer) -> Result<Self> {
self.directory_buffers.insert(parent, dir); self.directory_buffers.insert(parent, dir);
self.refresh() Ok(self)
} }
fn select(mut self) -> Result<Self> { fn select(mut self) -> Result<Self> {
if let Some(n) = self.focused_node().map(|n| n.to_owned()) { if let Some(n) = self.focused_node().map(|n| n.to_owned()) {
self.selection.insert(n); self.selection.insert(n);
self.refresh() Ok(self)
} else { } else {
Ok(self) Ok(self)
} }
@ -2253,7 +2230,7 @@ impl App {
let filename = path.file_name().map(|p| p.to_string_lossy().to_string()); let filename = path.file_name().map(|p| p.to_string_lossy().to_string());
if let (Some(p), Some(n)) = (parent, filename) { if let (Some(p), Some(n)) = (parent, filename) {
self.selection.insert(Node::new(p, n)); self.selection.insert(Node::new(p, n));
self.refresh() Ok(self)
} else { } else {
Ok(self) Ok(self)
} }
@ -2264,7 +2241,6 @@ impl App {
d.nodes.clone().into_iter().for_each(|n| { d.nodes.clone().into_iter().for_each(|n| {
self.selection.insert(n); self.selection.insert(n);
}); });
self.msg_out.push_back(MsgOut::Refresh);
}; };
Ok(self) Ok(self)
@ -2273,14 +2249,12 @@ impl App {
fn un_select(mut self) -> Result<Self> { fn un_select(mut self) -> Result<Self> {
if let Some(n) = self.focused_node().map(|n| n.to_owned()) { if let Some(n) = self.focused_node().map(|n| n.to_owned()) {
self.selection.retain(|s| s != &n); self.selection.retain(|s| s != &n);
self.msg_out.push_back(MsgOut::Refresh);
} }
Ok(self) Ok(self)
} }
fn un_select_path(mut self, path: String) -> Result<Self> { fn un_select_path(mut self, path: String) -> Result<Self> {
self.selection.retain(|n| n.absolute_path != path); self.selection.retain(|n| n.absolute_path != path);
self.msg_out.push_back(MsgOut::Refresh);
Ok(self) Ok(self)
} }
@ -2289,7 +2263,6 @@ impl App {
d.nodes.clone().into_iter().for_each(|n| { d.nodes.clone().into_iter().for_each(|n| {
self.selection.retain(|s| s != &n); self.selection.retain(|s| s != &n);
}); });
self.msg_out.push_back(MsgOut::Refresh);
}; };
Ok(self) Ok(self)
@ -2328,7 +2301,6 @@ impl App {
fn clear_selection(mut self) -> Result<Self> { fn clear_selection(mut self) -> Result<Self> {
self.selection.clear(); self.selection.clear();
self.msg_out.push_back(MsgOut::Refresh);
Ok(self) Ok(self)
} }

@ -581,7 +581,6 @@ xplr.config.modes.builtin.default = {
{ {
SwitchModeBuiltin = "action" SwitchModeBuiltin = "action"
}, },
"Refresh"
} }
}, },
["?"] = { ["?"] = {
@ -597,7 +596,7 @@ xplr.config.modes.builtin.default = {
}, },
["G"] = { ["G"] = {
help = "go to bottom", help = "go to bottom",
messages = {"PopMode", "FocusLast", "Refresh"} messages = {"PopMode", "FocusLast"}
}, },
["ctrl-a"] = { ["ctrl-a"] = {
help = "select/unselect all", help = "select/unselect all",
@ -626,7 +625,7 @@ xplr.config.modes.builtin.default = {
}, },
["ctrl-r"] = { ["ctrl-r"] = {
help = "refresh screen", help = "refresh screen",
messages = {"ClearScreen", "Refresh"} messages = {"ClearScreen"}
}, },
["ctrl-u"] = { ["ctrl-u"] = {
help = "clear selection", help = "clear selection",
@ -638,7 +637,6 @@ xplr.config.modes.builtin.default = {
{ {
SwitchModeBuiltin = "switch_layout" SwitchModeBuiltin = "switch_layout"
}, },
"Refresh"
} }
}, },
["d"] = { ["d"] = {
@ -648,7 +646,6 @@ xplr.config.modes.builtin.default = {
{ {
SwitchModeBuiltin = "delete" SwitchModeBuiltin = "delete"
}, },
"Refresh"
} }
}, },
down = { down = {
@ -668,7 +665,6 @@ xplr.config.modes.builtin.default = {
messages = { messages = {
"PopMode", "PopMode",
{ SwitchModeBuiltin = "filter" }, { SwitchModeBuiltin = "filter" },
"Refresh"
} }
}, },
["g"] = { ["g"] = {
@ -676,7 +672,6 @@ xplr.config.modes.builtin.default = {
messages = { messages = {
"PopMode", "PopMode",
{ SwitchModeBuiltin = "go_to" }, { SwitchModeBuiltin = "go_to" },
"Refresh"
} }
}, },
left = { left = {
@ -697,7 +692,6 @@ xplr.config.modes.builtin.default = {
echo SetInputBuffer: "'"$(basename "${XPLR_FOCUS_PATH}")"'" >> "${XPLR_PIPE_MSG_IN:?}" echo SetInputBuffer: "'"$(basename "${XPLR_FOCUS_PATH}")"'" >> "${XPLR_PIPE_MSG_IN:?}"
]===] ]===]
}, },
"Refresh"
} }
}, },
right = { right = {
@ -709,7 +703,6 @@ xplr.config.modes.builtin.default = {
messages = { messages = {
"PopMode", "PopMode",
{ SwitchModeBuiltin = "sort" }, { SwitchModeBuiltin = "sort" },
"Refresh"
} }
}, },
space = { space = {
@ -767,7 +760,7 @@ xplr.config.modes.builtin.recover = {
}, },
esc = { esc = {
help = "escape", help = "escape",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,
@ -805,7 +798,6 @@ xplr.config.modes.builtin.selection_ops = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["ctrl-c"] = { ["ctrl-c"] = {
@ -814,7 +806,7 @@ xplr.config.modes.builtin.selection_ops = {
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
["m"] = { ["m"] = {
help = "move here", help = "move here",
@ -833,7 +825,6 @@ xplr.config.modes.builtin.selection_ops = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["x"] = { ["x"] = {
@ -858,7 +849,6 @@ xplr.config.modes.builtin.selection_ops = {
}, },
"ClearScreen", "ClearScreen",
"PopMode", "PopMode",
"Refresh"
} }
} }
}, },
@ -894,7 +884,7 @@ xplr.config.modes.builtin.create = {
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
["f"] = { ["f"] = {
help = "create file", help = "create file",
@ -957,7 +947,6 @@ xplr.config.modes.builtin.create_directory = {
&& echo FocusByFileName: "'"$PTH"'" >> "${XPLR_PIPE_MSG_IN:?}" && echo FocusByFileName: "'"$PTH"'" >> "${XPLR_PIPE_MSG_IN:?}"
else else
echo PopMode >> "${XPLR_PIPE_MSG_IN:?}" echo PopMode >> "${XPLR_PIPE_MSG_IN:?}"
echo Refresh >> "${XPLR_PIPE_MSG_IN:?}"
fi fi
]===] ]===]
} }
@ -965,7 +954,7 @@ xplr.config.modes.builtin.create_directory = {
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,
@ -1019,7 +1008,6 @@ xplr.config.modes.builtin.create_file = {
&& echo FocusByFileName: "'"$PTH"'" >> "${XPLR_PIPE_MSG_IN:?}" && echo FocusByFileName: "'"$PTH"'" >> "${XPLR_PIPE_MSG_IN:?}"
else else
echo PopMode >> "${XPLR_PIPE_MSG_IN:?}" echo PopMode >> "${XPLR_PIPE_MSG_IN:?}"
echo Refresh >> "${XPLR_PIPE_MSG_IN:?}"
fi fi
]===] ]===]
} }
@ -1027,7 +1015,7 @@ xplr.config.modes.builtin.create_file = {
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,
@ -1069,19 +1057,19 @@ xplr.config.modes.builtin.number = {
}, },
down = { down = {
help = "to down", help = "to down",
messages = {"FocusNextByRelativeIndexFromInput", "PopMode", "Refresh"} messages = {"FocusNextByRelativeIndexFromInput", "PopMode"}
}, },
enter = { enter = {
help = "to index", help = "to index",
messages = {"FocusByIndexFromInput", "PopMode", "Refresh"} messages = {"FocusByIndexFromInput", "PopMode"}
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
up = { up = {
help = "to up", help = "to up",
messages = {"FocusPreviousByRelativeIndexFromInput", "PopMode", "Refresh"} messages = {"FocusPreviousByRelativeIndexFromInput", "PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,
@ -1110,15 +1098,15 @@ xplr.config.modes.builtin.go_to = {
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
["f"] = { ["f"] = {
help = "follow symlink", help = "follow symlink",
messages = {"FollowSymlink", "PopMode", "Refresh"} messages = {"FollowSymlink", "PopMode"}
}, },
["g"] = { ["g"] = {
help = "top", help = "top",
messages = {"FocusFirst", "PopMode", "Refresh"} messages = {"FocusFirst", "PopMode"}
}, },
["x"] = { ["x"] = {
help = "open in gui", help = "open in gui",
@ -1140,7 +1128,6 @@ xplr.config.modes.builtin.go_to = {
}, },
"ClearScreen", "ClearScreen",
"PopMode", "PopMode",
"Refresh"
} }
} }
}, },
@ -1192,12 +1179,11 @@ xplr.config.modes.builtin.rename = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,
@ -1234,7 +1220,6 @@ xplr.config.modes.builtin.delete = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["ctrl-c"] = { ["ctrl-c"] = {
@ -1266,12 +1251,11 @@ xplr.config.modes.builtin.delete = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,
@ -1299,7 +1283,6 @@ xplr.config.modes.builtin.action = {
}, },
"ExplorePwdAsync", "ExplorePwdAsync",
"PopMode", "PopMode",
"Refresh"
} }
}, },
["c"] = { ["c"] = {
@ -1309,7 +1292,6 @@ xplr.config.modes.builtin.action = {
{ {
SwitchModeBuiltin = "create" SwitchModeBuiltin = "create"
}, },
"Refresh"
} }
}, },
["ctrl-c"] = { ["ctrl-c"] = {
@ -1325,12 +1307,11 @@ xplr.config.modes.builtin.action = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
["l"] = { ["l"] = {
help = "logs", help = "logs",
@ -1342,7 +1323,6 @@ xplr.config.modes.builtin.action = {
]===] ]===]
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["s"] = { ["s"] = {
@ -1352,7 +1332,6 @@ xplr.config.modes.builtin.action = {
{ {
SwitchModeBuiltin = "selection_ops" SwitchModeBuiltin = "selection_ops"
}, },
"Refresh"
} }
}, },
["q"] = { ["q"] = {
@ -1442,7 +1421,6 @@ xplr.config.modes.builtin.search = {
}, },
"PopMode", "PopMode",
"ExplorePwdAsync", "ExplorePwdAsync",
"Refresh"
} }
}, },
left = { left = {
@ -1543,7 +1521,7 @@ xplr.config.modes.builtin.filter = {
}, },
enter = { enter = {
help = "done", help = "done",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
["r"] = { ["r"] = {
help = "relative does contain", help = "relative does contain",
@ -1624,7 +1602,7 @@ xplr.config.modes.builtin.relative_path_does_contain = {
}, },
enter = { enter = {
help = "apply filter", help = "apply filter",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
esc = { esc = {
help = "cancel", help = "cancel",
@ -1634,7 +1612,6 @@ xplr.config.modes.builtin.relative_path_does_contain = {
}, },
"PopMode", "PopMode",
"ExplorePwdAsync", "ExplorePwdAsync",
"Refresh"
} }
} }
}, },
@ -1711,7 +1688,7 @@ xplr.config.modes.builtin.relative_path_does_not_contain = {
}, },
enter = { enter = {
help = "apply filter", help = "apply filter",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
esc = { esc = {
help = "cancel", help = "cancel",
@ -1856,7 +1833,7 @@ xplr.config.modes.builtin.sort = {
}, },
enter = { enter = {
help = "done", help = "done",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
}, },
["m"] = { ["m"] = {
help = "by canonical mime essence", help = "by canonical mime essence",
@ -1942,7 +1919,6 @@ xplr.config.modes.builtin.switch_layout = {
SwitchLayoutBuiltin = "default" SwitchLayoutBuiltin = "default"
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["2"] = { ["2"] = {
@ -1952,7 +1928,6 @@ xplr.config.modes.builtin.switch_layout = {
SwitchLayoutBuiltin = "no_help" SwitchLayoutBuiltin = "no_help"
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["3"] = { ["3"] = {
@ -1962,7 +1937,6 @@ xplr.config.modes.builtin.switch_layout = {
SwitchLayoutBuiltin = "no_selection" SwitchLayoutBuiltin = "no_selection"
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["4"] = { ["4"] = {
@ -1972,7 +1946,6 @@ xplr.config.modes.builtin.switch_layout = {
SwitchLayoutBuiltin = "no_help_no_selection" SwitchLayoutBuiltin = "no_help_no_selection"
}, },
"PopMode", "PopMode",
"Refresh"
} }
}, },
["ctrl-c"] = { ["ctrl-c"] = {
@ -1981,7 +1954,7 @@ xplr.config.modes.builtin.switch_layout = {
}, },
esc = { esc = {
help = "cancel", help = "cancel",
messages = {"PopMode", "Refresh"} messages = {"PopMode"}
} }
}, },
on_alphabet = nil, on_alphabet = nil,

Loading…
Cancel
Save