Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions pi-coding-agent.el
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ This is a read-only buffer showing the conversation history."
(setq-local markdown-hide-markup t)
(add-to-invisibility-spec 'markdown-markup)
(setq-local pi-coding-agent--tool-args-cache (make-hash-table :test 'equal))
;; Disable hl-line-mode: its post-command-hook overlay update causes
;; scroll oscillation in buffers with invisible text + variable heights.
(setq-local global-hl-line-mode nil)
(hl-line-mode -1)
;; Make window-point follow inserted text (like comint does).
;; This is key for natural scroll behavior during streaming.
(setq-local window-point-insertion-type t)
Expand Down
7 changes: 7 additions & 0 deletions test/pi-coding-agent-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ This ensures all files get code fences for consistent display."
(should word-wrap)
(should-not truncate-lines)))

(ert-deftest pi-coding-agent-test-chat-mode-disables-hl-line ()
"pi-coding-agent-chat-mode disables hl-line to prevent scroll oscillation."
(with-temp-buffer
(pi-coding-agent-chat-mode)
(should-not hl-line-mode)
(should-not (buffer-local-value 'global-hl-line-mode (current-buffer)))))

(ert-deftest pi-coding-agent-test-input-mode-derives-from-text ()
"pi-coding-agent-input-mode is derived from text-mode."
(with-temp-buffer
Expand Down