mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-14 04:43:42 +01:00
refactor(windows): reintegrate_maximized_window has KDE's error strings and Copy form
"there is no maximized restore index" and "there is no maximized window" replace the two strings that were copied from the monocle code, and the as_ref plus deref of the maximized window is dropped (Window is Copy), as on KDE. Item 7 of the Windows list in core-model.md section 7. BEHAVIOUR: only the text of two error messages, shown if a command asks to toggle maximize with nothing maximized. e2e gate: none needed beyond maximizing. Verified: Windows clippy -D warnings via tools/fast-check PASS.
This commit is contained in:
1 parent
03404aab07
commit
839dd2a2de
1 file changed
+2
-4
@@ -1943,14 +1943,12 @@ impl Workspace {
|
||||
pub fn reintegrate_maximized_window(&mut self) -> eyre::Result<()> {
|
||||
let restore_idx = self
|
||||
.maximized_window_restore_idx
|
||||
.ok_or_eyre("there is no monocle restore index")?;
|
||||
.ok_or_eyre("there is no maximized restore index")?;
|
||||
|
||||
let window = self
|
||||
.maximized_window
|
||||
.as_ref()
|
||||
.ok_or_eyre("there is no monocle container")?;
|
||||
.ok_or_eyre("there is no maximized window")?;
|
||||
|
||||
let window = *window;
|
||||
if !self.containers().is_empty() && restore_idx > self.containers().len().saturating_sub(1)
|
||||
{
|
||||
self.containers_mut()
|
||||
|
||||
Reference in new issue
Block a user