diff --git a/doc/canola.txt b/doc/canola.txt index d716997..bd302f0 100644 --- a/doc/canola.txt +++ b/doc/canola.txt @@ -479,21 +479,6 @@ close({opts}) *canola.c {exit_if_last_buf} `nil|boolean` Exit vim if this canola buffer is the last open buffer -toggle({dir}, {opts}, {cb}) *canola.toggle* - Open canola browser for a directory, or close it if already open - - Parameters: - {dir} `nil|string` When nil, open the parent of the current buffer, or - the cwd if current buffer is not a file - {opts} `nil|canola.OpenOpts` - {preview} `nil|canola.OpenPreviewOpts` When present, open the preview - window after opening canola - {vertical} `nil|boolean` Open the buffer in a vertical split - {horizontal} `nil|boolean` Open the buffer in a horizontal split - {split} `nil|"aboveleft"|"belowright"|"topleft"|"botright"` S - plit modifier - {cb} `nil|fun()` Called after the canola buffer is ready - open_preview({opts}, {callback}) *canola.open_preview* Preview the entry under the cursor in a split diff --git a/doc/upstream.md b/doc/upstream.md index 3b924c8..81c4311 100644 --- a/doc/upstream.md +++ b/doc/upstream.md @@ -37,7 +37,6 @@ Bugs fixed in this fork that remain open upstream. | [#710](https://github.com/stevearc/oil.nvim/issues/710) | buftype empty on BufEnter | [#10](https://github.com/barrettruth/canola.nvim/pull/10) ([`01b860e`](https://github.com/barrettruth/canola.nvim/commit/01b860e)) | | [#213](https://github.com/stevearc/oil.nvim/issues/213) | Max file size for preview | [#85](https://github.com/barrettruth/canola.nvim/pull/85) ([`4b32ada`](https://github.com/barrettruth/canola.nvim/commit/4b32ada)) | | [#473](https://github.com/stevearc/oil.nvim/issues/473) | Show hidden when dir is all-hidden | [#85](https://github.com/barrettruth/canola.nvim/pull/85) ([`2fe4e78`](https://github.com/barrettruth/canola.nvim/commit/2fe4e78)) | -| [#621](https://github.com/stevearc/oil.nvim/issues/621) | `toggle()` for regular windows | [#88](https://github.com/barrettruth/canola.nvim/pull/88) ([`385bd82`](https://github.com/barrettruth/canola.nvim/commit/385bd82)) | ## Open upstream PRs @@ -127,7 +126,7 @@ Bugs fixed in this fork that remain open upstream. | [#612](https://github.com/stevearc/oil.nvim/issues/612) | fixed | Delete buffers on file delete — `cleanup_buffers_on_delete` option | | [#615](https://github.com/stevearc/oil.nvim/issues/615) | fixed | Cursor at name column on o/O — [#72](https://github.com/barrettruth/canola.nvim/pull/72) ([`69d85b8`](https://github.com/barrettruth/canola.nvim/commit/69d85b8)) | | [#617](https://github.com/stevearc/oil.nvim/issues/617) | open | Filetype by actual filetype (P2) | -| [#621](https://github.com/stevearc/oil.nvim/issues/621) | fixed | `toggle()` for regular windows — [#88](https://github.com/barrettruth/canola.nvim/pull/88) ([`385bd82`](https://github.com/barrettruth/canola.nvim/commit/385bd82)) | +| [#621](https://github.com/stevearc/oil.nvim/issues/621) | open | Toggle function for regular windows (P2) | | [#623](https://github.com/stevearc/oil.nvim/issues/623) | not actionable | bufferline.nvim interaction — cross-plugin | | [#624](https://github.com/stevearc/oil.nvim/issues/624) | not actionable | Mutation race — no reliable repro | | [#625](https://github.com/stevearc/oil.nvim/issues/625) | not actionable | E19 mark invalid line — intractable without neovim API changes | diff --git a/lua/canola/init.lua b/lua/canola/init.lua index e556920..18d9896 100644 --- a/lua/canola/init.lua +++ b/lua/canola/init.lua @@ -526,20 +526,6 @@ M.close = function(opts) vim.api.nvim_buf_delete(canolabuf, { force = true }) end ----@param dir? string ----@param opts? canola.OpenOpts ----@param cb? fun() -M.toggle = function(dir, opts, cb) - if vim.w.is_canola_win or vim.bo.filetype == 'canola' then - M.close() - if cb then - cb() - end - else - M.open(dir, opts, cb) - end -end - ---@class canola.OpenPreviewOpts ---@field vertical? boolean Open the buffer in a vertical split ---@field horizontal? boolean Open the buffer in a horizontal split