diff --git a/README.md b/README.md index 80846ef..a220adc 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ local config = { - A custom function that returns a window number and optionally a buffer. - `Flatten.OpenContext`: - - `files`: `string[]` + - `files`: `Flatten.BufInfo[]` - The list of files passed to the host. - `argv`: `string[]` - The full argv list from the *guest* instance. diff --git a/lua/flatten/core.lua b/lua/flatten/core.lua index e7388d3..3082beb 100644 --- a/lua/flatten/core.lua +++ b/lua/flatten/core.lua @@ -279,7 +279,7 @@ function M.edit_files(opts) winnr = winnr or vim.api.nvim_get_current_win() bufnr = bufnr or vim.api.nvim_get_current_buf() elseif type(open) == "function" then - bufnr, winnr = open({ + winnr, bufnr = open({ files = files, argv = argv, stdin_buf = stdin_buf,