]> git.eshelyaron.com Git - emacs.git/commitdiff
; Additional fixup for truncation of long lines in compilation buffers
authorPhil Sainty <psainty@orcon.net.nz>
Sat, 13 Apr 2024 12:49:56 +0000 (00:49 +1200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 14 Apr 2024 17:10:43 +0000 (19:10 +0200)
* 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

index d7690b7fa74803b617c56e3ca5b4835d18fbf9dc..b18eb81fee144a1fd0a32de89419a13b18f812c1 100644 (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)))))