]> git.eshelyaron.com Git - emacs.git/commitdiff
track-changes.el: Fix last change for early use
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 17 Apr 2024 13:04:12 +0000 (09:04 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Apr 2024 11:03:16 +0000 (14:03 +0300)
* lisp/emacs-lisp/track-changes.el (track-changes--recover-from-error):
Don't burp if there have been fewer than 20 keystrokes since Emacs start.

(cherry picked from commit 3660c51736072816b65265e60e0b7475375e2a73)

lisp/emacs-lisp/track-changes.el

index 6e4440b7771eccf0603f0b12b450ae15d58147ae..03d031deb4d787678509c6873e2168a56cef5f87 100644 (file)
@@ -442,7 +442,7 @@ Details logged to `track-changes--error-log'")
                   (when tail (setcdr tail '...))
                   bf)
                 (let ((rk (recent-keys 'include-cmds)))
-                  (substring rk -20)))
+                  (if (< (length rk) 20) rk (substring rk -20))))
           track-changes--error-log))
   (setq track-changes--before-clean 'unset)
   (setq track-changes--buffer-size (buffer-size))