Function: ghostel-readonly-copy

ghostel-readonly-copy is an interactive and natively compiled function defined in ghostel.el.

Signature

(ghostel-readonly-copy)

Documentation

Copy the selected region.

Soft-wrapped newlines are removed and trailing whitespace is stripped so the copied text matches the original terminal content. When ghostel-readonly-fast-exit is non-nil, also exits read-only mode.

Key Bindings

ghostel-readonly-mode-map C-w ghostel-readonly-mode-map M-w

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel-readonly-copy ()
  "Copy the selected region.
Soft-wrapped newlines are removed and trailing whitespace is
stripped so the copied text matches the original terminal content.
When `ghostel-readonly-fast-exit' is non-nil, also exits read-only mode."
  (interactive)
  (when (use-region-p)
    (kill-ring-save (region-beginning) (region-end)))
  (when ghostel-readonly-fast-exit
    (ghostel-readonly-exit)))