Skip to content

Commit

Permalink
Return to normal mode after visual mode
Browse files Browse the repository at this point in the history
  • Loading branch information
piersolenski committed Nov 4, 2023
1 parent 3247bf9 commit 153ebd3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/wtf/ai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ local function get_content_between_lines(start_line, end_line)
end

M.diagnose = function(line1, line2, instructions)
-- Return the user to normal mode
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<esc>", true, false, true), "x", true)

local diagnostics = get_diagnostics(line1, line2)
local programming_language = get_programming_language()
local should_send_code = config.options.context
Expand Down

0 comments on commit 153ebd3

Please sign in to comment.