summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2021-07-22 22:29:14 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2021-07-22 22:32:14 -0400
commit97ca1fb6d44de66d872422783c38ae198b0edfb9 (patch)
tree695eacc8aaeda28f32fd839169fb8862caf09571 /src/config
parent4385f6eb523ece963b154f2525f82e8e9f3882f1 (diff)
add automatically_count_files option
- for now, this disables counting number of files in a directory - future plans is to change this to opportunistic file counting - i.e. if we already have the directory loaded, then finding the file count is pretty trivial - it just requires a bit of refactoring
Diffstat (limited to 'src/config')
-rw-r--r--src/config/default/display.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config/default/display.rs b/src/config/default/display.rs
index 0e3c006..4663a4c 100644
--- a/src/config/default/display.rs
+++ b/src/config/default/display.rs
@@ -12,6 +12,9 @@ const fn default_true() -> bool {
#[derive(Clone, Debug, Deserialize)]
pub struct DisplayRawOption {
+ #[serde(default)]
+ automatically_count_files: bool,
+
#[serde(default = "default_true")]
collapse_preview: bool,
@@ -58,6 +61,7 @@ impl Flattenable<DisplayOption> for DisplayRawOption {
];
DisplayOption {
+ _automatically_count_files: self.automatically_count_files,
_collapse_preview: self.collapse_preview,
column_ratio,
_show_borders: self.show_borders,
@@ -75,7 +79,8 @@ impl Flattenable<DisplayOption> for DisplayRawOption {
impl std::default::Default for DisplayRawOption {
fn default() -> Self {
Self {
- collapse_preview: default_true(),
+ automatically_count_files: false,
+ collapse_preview: true,
column_ratio: None,
show_borders: true,
show_hidden: false,