feat(api): add node.open.vertical_no_picker, node.open.horizontal_no_picker (#3031)
* test * add splits with no window pickers removed the 1 buffer per file limitation test test2 * no-picker for splits * help vertical/horizontal_no_picker * revert whitespace changes --------- Co-authored-by: JoeDaBu <joegbu@gmail.com> Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -235,9 +235,8 @@ end
|
||||
|
||||
local function get_target_winid(mode)
|
||||
local target_winid
|
||||
if not M.window_picker.enable or mode == "edit_no_picker" or mode == "preview_no_picker" then
|
||||
if not M.window_picker.enable or string.find(mode, "no_picker") then
|
||||
target_winid = lib.target_winid
|
||||
|
||||
-- first available window
|
||||
if not vim.tbl_contains(vim.api.nvim_tabpage_list_wins(0), target_winid) then
|
||||
target_winid = first_win_id()
|
||||
@@ -280,6 +279,11 @@ local function open_in_new_window(filename, mode)
|
||||
return
|
||||
end
|
||||
|
||||
local position = string.find(mode, "no_picker")
|
||||
if position then
|
||||
mode = string.sub(mode, 0, position - 2)
|
||||
end
|
||||
|
||||
-- non-floating, non-nvim-tree windows
|
||||
local win_ids = vim.tbl_filter(function(id)
|
||||
local config = vim.api.nvim_win_get_config(id)
|
||||
|
||||
Reference in New Issue
Block a user