stefandtw / quickfix-reflector.vim

Change code right in the quickfix window
MIT License
347 stars 18 forks source link

Ignore lines without file and line #5

Closed idbrii closed 9 years ago

idbrii commented 9 years ago

Since you can't find lines without file and line, can they be ignored?

Example file based on Visual Studio C++ output format (save as C:/temp/c.out)

------ Skipped Build: Project: game_pc, Configuration: Release x64 ------
Project not selected to build for this solution configuration 
file1.cpp
file2.cpp
file3.cpp
file4.cpp
C:/temp/c.out(15): some text here

On Windows Vim 7.4 and 8a55c0209ae7fec0528b4383733865c7700da288, I use these commands:

:compiler msvc
:cgetfile /temp/c.out
:copen

And then change "some" to "more" and :w and I get errors:

Error detected while processing function <SNR>99_OnWrite..<SNR>99_Replace:
line    5:
Zero count: tab sbuffer 0
line   21:
E784: Cannot close last tab page
line    5:
Zero count: tab sbuffer 0
line   21:
E784: Cannot close last tab page
line    5:
Zero count: tab sbuffer 0
line   21:
E784: Cannot close last tab page
line    5:
Zero count: tab sbuffer 0
line   21:
E784: Cannot close last tab page
line    5:
Zero count: tab sbuffer 0
line   21:
E784: Cannot close last tab page
line    5:
Zero count: tab sbuffer 0
line   21:
E784: Cannot close last tab page
E784: Cannot close last tab page
0/7 changes applied. See lines marked [ERROR].

And my quickfix looks like:

|| [ERROR]Project not selected to build for this solution configuration 
|| [ERROR]file1.cpp
|| [ERROR]file2.cpp
|| [ERROR]file3.cpp
|| [ERROR]file4.cpp
|| [ERROR]------ Skipped Build: Project: shaders_pc, Configuration: Release x64 ------
c.out|15| [ERROR] some text here

So it seems that there's lots of unnecessary errors for lines that obviously can have nothing done for them since there's no associated file. I've seen similar for files with no associated line number.

stefandtw commented 9 years ago

From now on, lines without an associated file should be ignored.

idbrii commented 9 years ago

Thanks!