File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -863,6 +863,7 @@ function M.setup(config)
863863 ctxlen = # selection .lines ,
864864 }))
865865
866+ diff = diff .. ' \n ' .. M .config .separator .. ' \n '
866867 state .diff :show (diff , filetype , ' diff' , state .chat .winnr )
867868 end
868869 end )
@@ -873,6 +874,7 @@ function M.setup(config)
873874 return
874875 end
875876
877+ prompt = prompt .. ' \n ' .. M .config .separator .. ' \n '
876878 state .system_prompt :show (prompt , ' markdown' , ' markdown' , state .chat .winnr )
877879 end )
878880
@@ -884,9 +886,12 @@ function M.setup(config)
884886
885887 local filetype = selection .filetype or vim .bo [state .source .bufnr ].filetype
886888 local lines = selection .lines
887- if vim .trim (lines ) ~ = ' ' then
888- state . user_selection : show ( lines , filetype , filetype , state . chat . winnr )
889+ if vim .trim (lines ) = = ' ' then
890+ return
889891 end
892+
893+ lines = lines .. ' \n ' .. M .config .separator .. ' \n '
894+ state .user_selection :show (lines , filetype , filetype , state .chat .winnr )
890895 end )
891896
892897 vim .api .nvim_create_autocmd ({ ' BufEnter' , ' BufLeave' }, {
You can’t perform that action at this time.
0 commit comments