feat: add option to disable realigning working set windows on show/hide (#21)

This commit is contained in:
alexdenerqal
2024-03-30 09:32:52 +01:00
committed by GitHub
parent 7eb5201c90
commit aae649b1f2
3 changed files with 8 additions and 1 deletions

View File

@@ -150,7 +150,7 @@ where
self.overlays.values_mut().for_each(|o| { self.overlays.values_mut().for_each(|o| {
if o.state.show_hide { if o.state.show_hide {
o.state.want_visible = !any_shown; o.state.want_visible = !any_shown;
if o.state.want_visible && o.state.recenter { if o.state.want_visible && app.session.config.realign_on_showhide && o.state.recenter {
o.state.reset(app, false); o.state.reset(app, false);
} }
} }

View File

@@ -148,6 +148,9 @@ pub struct GeneralConfig {
#[serde(default = "def_true")] #[serde(default = "def_true")]
pub allow_sliding: bool, pub allow_sliding: bool,
#[serde(default = "def_true")]
pub realign_on_showhide: bool,
} }
impl GeneralConfig { impl GeneralConfig {

View File

@@ -15,3 +15,7 @@ watch_scale: 1.0
# Enable / disable sliding windows back and forth with the scroll action # Enable / disable sliding windows back and forth with the scroll action
# Default: true # Default: true
allow_sliding: true allow_sliding: true
# Enable / disable realigning the working set windows when they are shown/hidden
# Default: true
realign_on_showhide: true