Function: ghostel--line-mode-pre-redraw

ghostel--line-mode-pre-redraw is a natively compiled function defined in ghostel-line-mode.el.

Signature

(ghostel--line-mode-pre-redraw)

Documentation

Pause line mode when the alt screen comes up under it.

Runs atop ghostel--redraw-now before the renderer paints, so line mode tears down before libghostty's grid (which lacks the input) overwrites the buffer. A deliberate alt-screen entry
(ghostel--line-mode-on-alt-screen) is exempt; the flag clears
once the alt screen goes away so a later TUI pauses normally.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel--line-mode-pre-redraw ()
  "Pause line mode when the alt screen comes up under it.
Runs atop `ghostel--redraw-now' before the renderer paints, so line
mode tears down before libghostty's grid (which lacks the input)
overwrites the buffer.  A deliberate alt-screen entry
\(`ghostel--line-mode-on-alt-screen') is exempt; the flag clears
once the alt screen goes away so a later TUI pauses normally."
  (when (eq ghostel--input-mode 'line)
    (if (ghostel-alt-screen-p)
        (unless ghostel--line-mode-on-alt-screen
          (ghostel--line-mode-pause))
      ;; Back on the primary screen — re-arm the pause for the next TUI.
      (setq ghostel--line-mode-on-alt-screen nil))))