Skip to content

Commit

Permalink
changed "hide" logic to handle insert mode
Browse files Browse the repository at this point in the history
  • Loading branch information
B P committed Mar 15, 2024
1 parent df53728 commit 9101b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/chatgpt/flows/chat/base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,10 @@ function Chat:open()

-- close
self:map(Config.options.chat.keymaps.close, function()
self:hide()
-- If current in insert mode, switch to insert mode
if vim.fn.mode() == "i" then
vim.api.nvim_command("stopinsert")
self:hide()
end
end)

Expand Down

0 comments on commit 9101b4c

Please sign in to comment.