On Thu, Apr 28, 2011 at 19:46, Colomban Wendling lists.ban@herbesfolles.org wrote:
Le 28/04/2011 01:49, Colomban Wendling a écrit :
Le 10/04/2011 15:03, Jiří Techet a écrit :
[...] 2edb068b81cb6d541d667efecd0ec4c346f0df51 Open the file in the msgwindow even if no linenumber is specified
I'll review this one later (tomorrow if it goes right).
I don't really like the patch and preferred to change msgwin_parse_grep_line() to something that directly parse file[:line[...]] so no need to do everything twice.
I agree it's not very nice, on the other hand I think it's the smallest patch that achieves what I need. Modifying msgwin_parse_grep_line() isn't enough, you'd have to modify parse_file_line() and be _very_ careful because you could screw up parse_compiler_error_line() which uses this function too with different parameters.
Though, why did you add a g_file_test(filename, G_FILE_EXISTS) before document_open_file()? Was it not to show "unable to open file" when the line don't actually contain a file or is this just a duplicate?
Precisely, otherwise the error appears in status bar every time you click a message without a filename in it.
However, again, I'm not sure why it's so important for your plugin since it may easily add a line suffix, though it's a little hackish, I admit.
Exactly. When I search for a file with the given name, then the result like
foo_bar.c:851
looks a little strange (I had to put the current cursor's position there if the file was opened, otherwise the buffer scrolled to a different place). So even though there's a workaround, I'd prefer to have it handled in geany.
Jiri