Function: ghostel-line-mode-self-insert

ghostel-line-mode-self-insert is an interactive and natively compiled function defined in ghostel-line-mode.el.

Signature

(ghostel-line-mode-self-insert &optional N)

Documentation

Self-insert N times, snapping point back to the input region first.

When point is in read-only scrollback, insert at the end of the in-progress input instead. The prefix argument N is forwarded to self-insert-command so C-u (universal-argument) works as expected.

Key Bindings

ghostel-line-mode-map SPC..~ ghostel-line-mode-map €..\x3FFFFF

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel-line-mode-self-insert (&optional n)
  "Self-insert N times, snapping point back to the input region first.
When point is in read-only scrollback, insert at the end of the
in-progress input instead.  The prefix argument N is forwarded to
`self-insert-command' so \\[universal-argument] works as expected."
  (interactive "p")
  (let ((start (and (markerp ghostel--line-input-start)
                    (marker-position ghostel--line-input-start)))
        (end   (and (markerp ghostel--line-input-end)
                    (marker-position ghostel--line-input-end))))
    (when (and start end (or (< (point) start) (> (point) end)))
      (deactivate-mark)
      (goto-char end)))
  (self-insert-command (or n 1)))