Function: ghostel--line-mode-trim-trailing-blank
ghostel--line-mode-trim-trailing-blank is a natively compiled function
defined in ghostel-line-mode.el.
Signature
(ghostel--line-mode-trim-trailing-blank START)
Documentation
Delete [START, point-max) if the region is pure whitespace.
Used in line-mode entry/restore to scrub the renderer's trailing blank rows past the input region while leaving any non-blank content (a status bar drawn below the prompt, a multi-line UI from the shell, etc.) intact.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel--line-mode-trim-trailing-blank (start)
"Delete `[START, point-max)' if the region is pure whitespace.
Used in line-mode entry/restore to scrub the renderer's trailing
blank rows past the input region while leaving any non-blank
content (a status bar drawn below the prompt, a multi-line UI from
the shell, etc.) intact."
(when (string-match-p "\\`[[:space:]]*\\'"
(buffer-substring-no-properties start (point-max)))
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
(delete-region start (point-max)))))