Fix narrowing problem in tramp-debug-buffer-command-completion-p

* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Respect narrowing.  (Bug#56225)
This commit is contained in:
Michael Albinus 2022-06-26 10:57:00 +02:00
parent a399eeac15
commit 3b7d8dd3b3

View 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)