@@ -1367,7 +1367,7 @@ M.prep_md = function(buf)
1367
1367
1368
1368
-- ensure normal mode
1369
1369
vim .api .nvim_command (" stopinsert" )
1370
- M ._H .feedkeys (" <esc>" , " x " )
1370
+ M ._H .feedkeys (" <esc>" , " xn " )
1371
1371
end
1372
1372
1373
1373
M .is_chat = function (buf , file_name )
@@ -1432,7 +1432,7 @@ M.prep_chat = function(buf, file_name)
1432
1432
vim .api .nvim_command (M .config .cmd_prefix .. rc .command )
1433
1433
-- go to normal mode
1434
1434
vim .api .nvim_command (" stopinsert" )
1435
- M ._H .feedkeys (" <esc>" , " x " )
1435
+ M ._H .feedkeys (" <esc>" , " xn " )
1436
1436
end , rc .comment )
1437
1437
else
1438
1438
_H .set_keymap ({ buf }, mode , rc .shortcut , " :<C-u>'<,'>" .. cmd , rc .comment )
@@ -1570,7 +1570,7 @@ M.open_buf = function(file_name, target, kind, toggle)
1570
1570
vim .api .nvim_command (" silent file " .. file_name )
1571
1571
else
1572
1572
-- move cursor to the beginning of the file and scroll to the end
1573
- M ._H .feedkeys (" ggG" , " x " )
1573
+ M ._H .feedkeys (" ggG" , " xn " )
1574
1574
end
1575
1575
1576
1576
-- delete whitespace lines at the end of the file
@@ -1699,7 +1699,7 @@ M.new_chat = function(params, model, system_prompt, toggle)
1699
1699
if params .range == 2 then
1700
1700
M .append_selection (params , cbuf , buf )
1701
1701
end
1702
- M ._H .feedkeys (" G" , " x " )
1702
+ M ._H .feedkeys (" G" , " xn " )
1703
1703
return buf
1704
1704
end
1705
1705
@@ -1785,7 +1785,7 @@ M.cmd.ChatPaste = function(params)
1785
1785
buf = win_found and buf or M .open_buf (last , target , M ._toggle_kind .chat , true )
1786
1786
1787
1787
M .append_selection (params , cbuf , buf )
1788
- M ._H .feedkeys (" G" , " x " )
1788
+ M ._H .feedkeys (" G" , " xn " )
1789
1789
end
1790
1790
1791
1791
M .cmd .ChatDelete = function ()
@@ -2479,7 +2479,7 @@ M.cmd.Context = function(params)
2479
2479
M .append_selection (params , cbuf , buf )
2480
2480
end
2481
2481
2482
- M ._H .feedkeys (" G" , " x " )
2482
+ M ._H .feedkeys (" G" , " xn " )
2483
2483
end
2484
2484
2485
2485
M .Prompt = function (params , target , prompt , model , template , system_template , whisper )
@@ -2657,7 +2657,7 @@ M.Prompt = function(params, target, prompt, model, template, system_template, wh
2657
2657
table.insert (messages , { role = " user" , content = user_prompt })
2658
2658
2659
2659
-- cancel possible visual mode before calling the model
2660
- M ._H .feedkeys (" <esc>" , " x " )
2660
+ M ._H .feedkeys (" <esc>" , " xn " )
2661
2661
2662
2662
local cursor = true
2663
2663
if not M .config .command_auto_select_response then
0 commit comments