emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/keycast 5ff96003e9 1/7: keycast-log-update-buffer: Don't f


From: ELPA Syncer
Subject: [nongnu] elpa/keycast 5ff96003e9 1/7: keycast-log-update-buffer: Don't fail in empty buffer
Date: Wed, 26 Jan 2022 09:58:26 -0500 (EST)

branch: elpa/keycast
commit 5ff96003e9017d048c496ebd73a5e153a1251ca0
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    keycast-log-update-buffer: Don't fail in empty buffer
---
 keycast.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/keycast.el b/keycast.el
index 154bbae12d..bae13cf2e0 100644
--- a/keycast.el
+++ b/keycast.el
@@ -372,8 +372,9 @@ instead."
                      (string-match-p "%[rR]" keycast-log-format))
             (unless keycast-log-newest-first
               (backward-char))
-            (delete-region (line-beginning-position)
-                           (1+ (line-end-position))))
+            (ignore-errors
+              (delete-region (line-beginning-position)
+                             (1+ (line-end-position)))))
           (insert output))
         (goto-char (if keycast-log-newest-first (point-min) (point-max)))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]