]> git.eshelyaron.com Git - emacs.git/commitdiff
Re-fix narrowing problem in tramp-debug-buffer-command-completion-p
authorStefan Kangas <stefan@marxist.se>
Tue, 5 Jul 2022 15:53:06 +0000 (17:53 +0200)
committerStefan Kangas <stefan@marxist.se>
Tue, 5 Jul 2022 16:33:29 +0000 (18:33 +0200)
* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Respect narrowing also for end of substring.  (Bug#56225)

lisp/net/tramp.el

index b580987e91029b77e5ad67967f9081e49cb18db9..3725910714769369e64928db30df9108ef13eaf8 100644 (file)
@@ -1957,7 +1957,7 @@ The outline level is equal to the verbosity of the Tramp message."
 They are completed by \"M-x TAB\" only in Tramp debug buffers."
   (with-current-buffer buffer
     (string-equal
-     (buffer-substring (point-min) (min 10 (point-max))) ";; Emacs:")))
+     (buffer-substring (point-min) (min (+ (point-min) 10) (point-max))) ";; Emacs:")))
 
 (put #'tramp-debug-buffer-command-completion-p 'tramp-suppress-trace t)