Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GpChatLast command, to open the last chat #234

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Correct typo
  • Loading branch information
myarcana committed Dec 15, 2024
commit ff3a16069113703ac3fdc2317af65c15e9200209
3 changes: 2 additions & 1 deletion lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ M.setup = function(opts)
ChatNew = { "popup", "split", "vsplit", "tabnew" },
ChatPaste = { "popup", "split", "vsplit", "tabnew" },
ChatToggle = { "popup", "split", "vsplit", "tabnew" },
ChatLast = { "popup", "split", "vsplit", "tabnew" },
Context = { "popup", "split", "vsplit", "tabnew" },
Agent = agent_completion,
}
Expand Down Expand Up @@ -897,7 +898,7 @@ M.cmd.ChatLast = function(params)
end
buf = win_found and buf or M.open_buf(last, M.resolve_buf_target(params), toggle and M._toggle_kind.chat or nil, toggle)
-- if there is a selection, paste it
if params.range ~= 2 then
if params.range == 2 then
M.render.append_selection(params, cbuf, buf, M.config.template_selection)
M.helpers.feedkeys("G", "xn")
end
Expand Down