aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client
diff options
context:
space:
mode:
authorTobias Genannt <tobias.genannt@qbeyond.de>2024-07-17 16:19:11 +0200
committerGitHub <noreply@github.com>2024-07-17 15:19:11 +0100
commit06c8ebd310738d7d17d358dabfe29955abd3ffc5 (patch)
treed2d2ccdda031161be0c7dded1a59cbbee299bbd5 /crates/atuin-client
parentfix(gui): kill child on block stop (#2288) (diff)
downloadatuin-06c8ebd310738d7d17d358dabfe29955abd3ffc5.zip
feat(tui): Fixed preview height option (#2286)
* Added "fixed" to preview strategy Uses max_preview_height as a fixed value to prevent the list from "jumping". * Added test for new setting
Diffstat (limited to 'crates/atuin-client')
-rw-r--r--crates/atuin-client/config.toml1
-rw-r--r--crates/atuin-client/src/settings.rs4
2 files changed, 5 insertions, 0 deletions
diff --git a/crates/atuin-client/config.toml b/crates/atuin-client/config.toml
index 4ddd93f5..00343dbb 100644
--- a/crates/atuin-client/config.toml
+++ b/crates/atuin-client/config.toml
@@ -209,6 +209,7 @@ records = true
## possible values: auto, static
## auto: length of the selected command.
## static: length of the longest command stored in the history.
+## fixed: use max_preview_height as fixed height.
# strategy = "auto"
[daemon]
diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs
index b64418cd..a83f36bb 100644
--- a/crates/atuin-client/src/settings.rs
+++ b/crates/atuin-client/src/settings.rs
@@ -410,6 +410,10 @@ pub enum PreviewStrategy {
// Preview height is calculated for the length of the longest command stored in the history.
#[serde(rename = "static")]
Static,
+
+ // max_preview_height is used as fixed height.
+ #[serde(rename = "fixed")]
+ Fixed,
}
#[derive(Clone, Debug, Deserialize, Serialize)]