diff options
| author | 2026-04-24 12:52:06 -0700 | |
|---|---|---|
| committer | 2026-04-24 12:52:06 -0700 | |
| commit | 3ff296ae3d4671143649949ea0470ff3a8daa41d (patch) | |
| tree | 215b057f11b5d61ec14ba7451d82b08be8dc98e8 | |
| parent | 4b6663cfcc2d9bac1e4c3ddb868d373aa89837ca (diff) | |
| download | new-dotfiles-3ff296ae3d4671143649949ea0470ff3a8daa41d.tar.gz new-dotfiles-3ff296ae3d4671143649949ea0470ff3a8daa41d.zip | |
glide: Fix errors in split windows when no split windows exist
| -rw-r--r-- | glide/.config/glide/glide.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/glide/.config/glide/glide.ts b/glide/.config/glide/glide.ts index 49c66de..62651a9 100644 --- a/glide/.config/glide/glide.ts +++ b/glide/.config/glide/glide.ts @@ -326,13 +326,19 @@ const unsplit_window = glide.excmds.create({ name: 'unsplit_window', description: 'Remove the current split of windows', }, ({ tab_id }) => { - glide.unstable.split_views.separate(tab_id); + if (glide.unstable.split_views.has_split_view(tab_id)) { + glide.unstable.split_views.separate(tab_id); + } }); const other_window = glide.excmds.create({ name: 'other_window', description: 'Focus other window', }, async ({ tab_id }) => { + if (!glide.unstable.split_views.has_split_view(tab_id)) { + return; + } + const split_tabs = await glide.unstable.split_views.get(tab_id); const other_tab = split_tabs.tabs.filter(t => t.id !== tab_id)[0]; |
