From: Stefan Kangas Date: Tue, 5 Jul 2022 15:53:06 +0000 (+0200) Subject: Re-fix narrowing problem in tramp-debug-buffer-command-completion-p X-Git-Tag: emacs-29.0.90~1447^2~1166 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bc8e2565431da27dbe4e3c3377760911f1e6432e;p=emacs.git Re-fix narrowing problem in tramp-debug-buffer-command-completion-p * lisp/net/tramp.el (tramp-debug-buffer-command-completion-p): Respect narrowing also for end of substring. (Bug#56225) --- diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b580987e910..37259107147 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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)