]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(compiler): Match gcc.vim make error format
authoryilisharcs <yilisharcs@gmail.com>
Wed, 17 Dec 2025 21:29:24 +0000 (22:29 +0100)
committerChristian Brabandt <cb@256bit.org>
Wed, 17 Dec 2025 21:29:24 +0000 (22:29 +0100)
Problem:  gcc.vim interprets "make: *** [Makefile" in the error message
          "make: *** [Makefile:2: all] Error 1" as a valid filename.
Solution: Add pattern to extract the filename correctly. Note that this
  doesn't remove the dangling "]" from the output ("all]").

closes: #18956

Signed-off-by: yilisharcs <yilisharcs@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/compiler/gcc.vim

index 7b6ebb98f4b120640fe9888785078f8a7e49ddf0..1d5900eb27bbf36f78ccbb2d6e9558c817c330db 100644 (file)
@@ -6,6 +6,7 @@
 "                      by Daniel Hahler, 2019 Jul 12
 "                      added line suggested by Anton Lindqvist 2016 Mar 31
 "                      2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
+"                      2025 Dec 17 by The Vim Project (correctly parse: 'make: *** [Makefile:2: all] Error 1')
 
 if exists("current_compiler")
   finish
@@ -16,6 +17,7 @@ let s:cpo_save = &cpo
 set cpo&vim
 
 CompilerSet errorformat=
+      \make:\ ***\ [%f:%l:\ %m,
       \%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
       \%*[^\"]\"%f\"%*\\D%l:\ %m,
       \\"%f\"%*\\D%l:%c:\ %m,