On Mon, 15 Aug 2011 10:19:26 +1000 Lex Trotman elextr@gmail.com wrote:
Anyway if Dimitar wants to decode the column numbers in msgwin_parse_compiler_error_line() and use them to set the cursor thats fine, so long as column number is optional.
Well you can always specify a two-match regular expression, such as "([^:]+):([0-9]+)" or "([^:]+):([0-9]+)[^A-Za-z]" for c++, and that will surely drop the column #, without the need for a special option.
Personally I wouldn't bother to add column numbers to the fallback msgwindow.c/parse_compiler_error().
Why not? There is only a single error_regex defined in the default configuration, everything else goes to the default parsing.
--
So here is the Compiler tab patch. Seeking to the exact column was a very nice extra when compiling Geany, even if I say so myself. :)
navqueue_goto_line[_col]() are written this way to preserve compatibility, since there may be a release in September. For the same reason, the Messages tab will have to wait.
Now the two questions, mentioned in navqueue.c:
How about supporting line number 0? process_build_output_line() does, and I, too, remember some old compilers emiting line 0.
How about leaving navqueue_goto_line_col() on pos == -1? According to Scintilla docs, it means that line - 1 is greater than the number of lines, and that's a wrong line # IMHO.