ChatGPT.nvim icon indicating copy to clipboard operation
ChatGPT.nvim copied to clipboard

Tab cycle over windows gives error under certain conditions

Open kiil opened this issue 2 years ago • 1 comments

<Tab> cycle over windows gives error in ChatGPTEditWithInstructions mode when the option window is NOT open.

This is the error:

E5108: Error executing lua: ...ack/packer/start/ChatGPT.nvim/lua/chatgpt/code_edits.lua:186: Expected Lua number
stack traceback:
        [C]: in function 'nvim_set_current_win'
        ...ack/packer/start/ChatGPT.nvim/lua/chatgpt/code_edits.lua:186: in function <...ack/packer/start/ChatGPT.nvim/lua/chatgpt/code_edits.lua:
181>

kiil avatar Dec 21 '22 10:12 kiil

<C-i> gives me a similar error

E5108: Error executing lua: ...te/pack/packer/start/ChatGPT.nvim/lua/chatgpt/module.lua:164: Expected Lua number
stack traceback:
        [C]: in function 'nvim_set_current_win'
        ...te/pack/packer/start/ChatGPT.nvim/lua/chatgpt/module.lua:164: in function <...te/pack/packer/start/ChatGPT.nvim/lua/chatgpt/module.lua:159>

pogopaule avatar Dec 27 '22 09:12 pogopaule

@kiil I've opened a PR https://github.com/jackMort/ChatGPT.nvim/pull/129 that should resolve this issue. It checks that the settings panel is open before cycling windows.

If you would like to test this branch, you can use the following (lazy.nvim):

    {
        "cmpadden/ChatGPT.nvim",
        branch = "fix-cycle-windows",
        config = function()
            require("chatgpt").setup({
              -- ...
            })
        end,
        dependencies = {
            "MunifTanjim/nui.nvim",
            "nvim-lua/plenary.nvim",
            "nvim-telescope/telescope.nvim",
        },
    },

cmpadden avatar Mar 30 '23 18:03 cmpadden