~protesilaos/dired-preview

99053aa4a30f6144297227e71f7ad3ef7924bd83 — Protesilaos Stavrou 7 months ago 2855b73
Reposition dired-preview--add-truncation-message
1 files changed, 7 insertions(+), 7 deletions(-)

M dired-preview.el
M dired-preview.el => dired-preview.el +7 -7
@@ 216,6 216,13 @@ Return the preview buffer."
   (t
    (dired-preview--find-file-no-select file))))

(defun dired-preview--add-truncation-message ()
  "Add a message indicating that the previewed file is truncated."
  (let ((end-ov (make-overlay (1- (point-max)) (point-max))))
    (overlay-put
     end-ov 'display
     (propertize "\n--PREVIEW TRUNCATED--" 'face 'shadow))))

(declare-function hexl-mode "hexl")
(declare-function hexl-mode-exit "hexl" (&optional arg))



@@ 249,13 256,6 @@ The size of the leading chunk is specified by
                         nil nil 'equal)
              (current-buffer))))))

(defun dired-preview--add-truncation-message ()
  "Add a message indicating that the previewed file is truncated."
  (let ((end-ov (make-overlay (1- (point-max)) (point-max))))
    (overlay-put
     end-ov 'display
     (propertize "\n--PREVIEW TRUNCATED--" 'face 'shadow))))

(defun dired-preview-hexl-toggle ()
  "Toggle preview between text and `hexl-mode'."
  (interactive)