]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix narrowing problem in tramp-debug-buffer-command-completion-p
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 26 Jun 2022 08:57:00 +0000 (10:57 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 26 Jun 2022 08:57:00 +0000 (10:57 +0200)
* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Respect narrowing.  (Bug#56225)

lisp/net/tramp.el

index c6665c279248abe7d8a9e9023cf8d094105c6744..9d5a02456ecb72a6e9fe5bc86e8a892b698f018b 100644 (file)
@@ -1955,7 +1955,8 @@ The outline level is equal to the verbosity of the Tramp message."
   "A predicate for Tramp interactive commands.
 They are completed by \"M-x TAB\" only in Tramp debug buffers."
   (with-current-buffer buffer
-    (string-equal (buffer-substring 1 (min 10 (point-max))) ";; Emacs:")))
+    (string-equal
+     (buffer-substring (point-min) (min 10 (point-max))) ";; Emacs:")))
 
 (put #'tramp-debug-buffer-command-completion-p 'tramp-suppress-trace t)