Skip to content

Commit

Permalink
fix: #26 bisect win opts by bufnr
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Mar 19, 2024
1 parent ea789e6 commit 816806c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/codecompanion/strategies/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ local function chat_autocmds(bufnr)
group = aug,
buffer = bufnr,
callback = function()
ui.set_win_options(api.nvim_get_current_win(), _G.codecompanion_win_opts)
ui.set_win_options(api.nvim_get_current_win(), _G.codecompanion_win_opts[bufnr])
end,
})

Expand Down Expand Up @@ -416,7 +416,7 @@ function Chat.new(args)
api.nvim_set_current_buf(bufnr)
end

_G.codecompanion_win_opts = ui.get_win_options(winid, config.options.display.chat.win_options)
_G.codecompanion_win_opts[bufnr] = ui.get_win_options(winid, config.options.display.chat.win_options)
ui.set_win_options(winid, config.options.display.chat.win_options)
vim.cmd("setlocal formatoptions-=t")
ui.buf_scroll_to_end(bufnr)
Expand Down

0 comments on commit 816806c

Please sign in to comment.