Skip to content

Set default option for relative positioning in toggle#227

Closed
codeWonderland wants to merge 1 commit intonickjvandyke:mainfrom
codeWonderland:toggle-defaults-failsafe
Closed

Set default option for relative positioning in toggle#227
codeWonderland wants to merge 1 commit intonickjvandyke:mainfrom
codeWonderland:toggle-defaults-failsafe

Conversation

@codeWonderland
Copy link
Copy Markdown

This is a failsafe for an edgecase where nvim_open_win doesn't know where to put the new window and just crashes

Description

Sets a default option for toggling the opencode window for the edge case where sometimes nvim_open_win crashes without it on update

Related Issue(s)

Fixes issue #226

This is a failsafe for an edgecase where nvim_open_win doesn't know where to put the new window and just crashes
@nickjvandyke
Copy link
Copy Markdown
Owner

Maybe this is a neovim 0.12 thing, but I then get:

E5108: Lua: /Users/nvandyke/dev/opencode.nvim/lua/opencode/terminal.lua:37: Required: 'relative' requires 'row'/'col' or 'bufpos'
stack traceback:

@codeWonderland
Copy link
Copy Markdown
Author

codeWonderland commented Apr 7, 2026

Hmmm, generally I've only added row and col arguments when it's a floating window. Let me update from nvim 0.11.5 to nvim 0.12

@nickjvandyke
Copy link
Copy Markdown
Owner

No worries, I already addressed it a bit differently using your solution as inspo. Thank you!

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.

2 participants