Skip to content

feat: add open_split/toggle_split API and upstream triage batch#83

Merged
barrettruth merged 4 commits into
mainfrom
feat/open-split-toggle-split
Mar 7, 2026
Merged

feat: add open_split/toggle_split API and upstream triage batch#83
barrettruth merged 4 commits into
mainfrom
feat/open-split-toggle-split

Conversation

@barrettruth
Copy link
Copy Markdown
Owner

Problem

canola had no way to open a file browser in a normal split window — only
floating windows via open_float/toggle_float. M.close also crashed
with E444 when called from the last window. The upstream tracker also had
stale/missing entries for 10 issues and PRs.

Solution

Port stevearc#728: add open_split(dir, opts, cb) and
toggle_split(dir, opts, cb) with vimdoc. Fix M.close to wrap
nvim_win_close in pcall with enew() fallback. Cherry-pick the
macOS FreeDesktop trash recipe from stevearc#739. Triage #288, #330, stevearc#362, stevearc#380,
stevearc#393, stevearc#507, stevearc#736 and add stevearc#738 to the tracker.

Problem: canola had no way to open a browser in a normal split window;
only floating windows were supported via `open_float`/`toggle_float`.
`M.close` also crashed with E444 when called from the last window.

Solution: port stevearc#728 — add `open_split(dir, opts, cb)`
and `toggle_split(dir, opts, cb)` mirroring the float API. Use
`is_canola_win`/`canola_original_win` window vars (not the upstream
`is_oil_win` names). Wrap `nvim_win_close` in `pcall` with `enew()`
fallback to handle the last-window E444 case.

Based on: stevearc#728
@barrettruth barrettruth merged commit 082573d into main Mar 7, 2026
8 checks passed
@barrettruth barrettruth deleted the feat/open-split-toggle-split branch March 7, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant