Function: ghostel-line-mode-interrupt

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

Signature

(ghostel-line-mode-interrupt)

Documentation

Discard local input and send SIGINT (\C-c) to the shell.

Stays in line mode for the next prompt.

Key Bindings

ghostel-line-mode-map C-c C-c

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel-line-mode-interrupt ()
  "Discard local input and send SIGINT (\\`C-c') to the shell.
Stays in line mode for the next prompt."
  (interactive)
  (ghostel--line-mode-delete-input)
  (setq ghostel--line-mode-history-index nil)
  ;; C-c discards readline's input buffer shell-side, so any adopted
  ;; prefix is gone — just zero our count, no backspaces needed.
  (setq ghostel--line-mode-adopted-count 0)
  ;; The line is discarded; clear its undo history too (mirrors send).
  (setq buffer-undo-list nil)
  (ghostel--write-pty ghostel--term "\C-c"))