From b2f3ad39486494fdeb0ed2df770f67fcfdcce292 Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Sun, 14 Apr 2024 00:49:56 +1200 Subject: [PATCH] ; Additional fixup for truncation of long lines in compilation buffers * lisp/progmodes/compile.el (compilation--insert-abbreviated-line): Handle long lines that end in a newline. (Bug#70236) The fix in commit 8f93cba324e4d4022a9422b8c56186213ba2de8d resulted in the previous "Don't hide the final newline" code causing an off-by-one error. With the new code the value of point is what is wanted in both cases. (cherry picked from commit f950621e6a177fc3110f3dec7c92b7d499fd25d6) --- lisp/progmodes/compile.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index d7690b7fa74..b18eb81fee1 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2661,10 +2661,7 @@ and runs `compilation-filter-hook'." (line-end-position)) (text-properties-at start))))) (put-text-property - start (if ends-in-nl - ;; Don't hide the final newline. - (1- (point)) - (point)) + start (point) 'display (if (char-displayable-p ?…) "[…]" "[...]")))) (if ends-in-nl (forward-char))))) -- 2.39.5