Skip to content

Commit

Permalink
feat: scroll the chat buffer when it's not in focus
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Feb 5, 2024
1 parent 2f17b60 commit d3d38ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/codecompanion/strategy/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ function Chat:submit()
render_messages(self.bufnr, settings, messages, {})

if cursor_moved and ui.buf_is_active(self.bufnr) then
ui.buf_scroll_to_end()
ui.buf_scroll_to_end(self.bufnr)
elseif not ui.buf_is_active(self.bufnr) then
ui.buf_scroll_to_end(self.bufnr)
end
end

Expand Down

0 comments on commit d3d38ff

Please sign in to comment.