branch: externals/consult
commit c9e6bfefb8665a77f7a82e028ed47d4be9bf1921
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
consult--find-file-temporarily-1: Insert truncation message
---
consult.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/consult.el b/consult.el
index 4437279a4d..1b016bccb7 100644
--- a/consult.el
+++ b/consult.el
@@ -1282,7 +1282,9 @@ ORIG is the original function, HOOKS the arguments."
(when (>= size consult-preview-partial-size)
(setq buffer-read-only t)
(with-silent-modifications
- (insert-file-contents name nil 0 consult-preview-partial-chunk))
+ (insert-file-contents name nil 0 consult-preview-partial-chunk)
+ (goto-char (point-max))
+ (insert "\nFile truncated. End of partial preview.\n"))
(goto-char (point-min))
;; Auto detect major mode and hope for the best, given the file which
;; is only previewed partially.