From f5714f2a8d1ee46a5da7b29fd4960514e0d64830 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 7 Jul 2023 10:34:46 +0100 Subject: fix C-u C-u M-! for very short Eshell buffers --- .emacs.d/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4fb23938..c5c5b552 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1928,7 +1928,8 @@ Some ideas behind these behaviours are as follows. (goto-char (point-max)) (skip-syntax-backward "\\s-") (- (point) (length >>>))))) - (unless (string= >>> (buffer-substring there (point-max))) + (unless (and (>= there 0) + (string= >>> (buffer-substring there (point-max)))) (save-excursion (goto-char (point-max)) (insert >>>) -- cgit v1.2.3