; 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 8f93cba324 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.
This commit is contained in:
Phil Sainty 2024-04-14 00:49:56 +12:00
parent 66c44c3cd7
commit f950621e6a

View file

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