Function: claude-code-ide--configure-vterm-buffer
claude-code-ide--configure-vterm-buffer is a natively compiled
function defined in claude-code-ide.el.
Signature
(claude-code-ide--configure-vterm-buffer)
Documentation
Configure vterm for enhanced performance and visual quality.
Establishes optimal terminal settings including rendering optimizations, cursor management, and process buffering for superior user experience.
Source Code
;; Defined in /nix/store/yjvbhwl7p6zrbw9xlnni7y4hra8sa3pl-emacs-packages-deps/share/emacs/site-lisp/claude-code-ide.el
(defun claude-code-ide--configure-vterm-buffer ()
"Configure vterm for enhanced performance and visual quality.
Establishes optimal terminal settings including rendering optimizations,
cursor management, and process buffering for superior user experience."
;; Disable automatic scrolling to bottom on output to prevent flickering
(setq-local vterm-scroll-to-bottom-on-output nil)
;; Disable immediate redraw to batch updates and reduce flickering
(when (boundp 'vterm--redraw-immididately)
(setq-local vterm--redraw-immididately nil))
;; Try to prevent cursor flickering by disabling Emacs' own cursor management
(setq-local cursor-in-non-selected-windows nil)
(setq-local blink-cursor-mode nil)
(setq-local cursor-type nil) ; Let vterm handle the cursor entirely
;; disable hl-line-mode, eliminates another source of flicker
(setq-local global-hl-line-mode nil)
(when (featurep 'hl-line)
(hl-line-mode -1))
;; make sure the non-breaking space in the prompt isn't themed
(face-remap-add-relative 'nobreak-space :inherit 'default)
;; Register hook for copy-mode cursor visibility
(add-hook 'vterm-copy-mode-hook #'claude-code-ide--vterm-copy-mode-hook nil t)
;; Increase process read buffering to batch more updates together
(when-let* ((proc (get-buffer-process (current-buffer))))
(set-process-query-on-exit-flag proc nil)
;; Try to make vterm read larger chunks at once
(when (fboundp 'process-put)
(process-put proc 'read-output-max 4096)))
;; Set up rendering optimization
(when claude-code-ide-vterm-anti-flicker
(advice-add 'vterm--filter :around #'claude-code-ide--vterm-smart-renderer)))