From bc8e2565431da27dbe4e3c3377760911f1e6432e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 5 Jul 2022 17:53:06 +0200 Subject: [PATCH] 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) --- lisp/net/tramp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5