Limit build error editor indicators to 50, but parse all errors in
the Compiler tab (fixes #3019823). git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5081 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
77c759319f
commit
ada3336bd8
@ -10,6 +10,9 @@
|
||||
* src/printing.c, doc/geany.txt, doc/geany.html:
|
||||
Always use white background color when printing (except for text
|
||||
with a white foreground) to save ink (should fix #2968998).
|
||||
* src/build.c, src/build.h, doc/geany.txt, doc/geany.html:
|
||||
Limit build error editor indicators to 50, but parse all errors in
|
||||
the Compiler tab (fixes #3019823).
|
||||
|
||||
|
||||
2010-06-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
@ -474,12 +474,11 @@ of this program, and also in the chapter <a class="reference" href="#gnu-general
|
||||
<li><a class="reference" href="#project-h" id="id216" name="id216">project.h</a></li>
|
||||
<li><a class="reference" href="#editor-h" id="id217" name="id217">editor.h</a></li>
|
||||
<li><a class="reference" href="#keyfile-c" id="id218" name="id218">keyfile.c</a></li>
|
||||
<li><a class="reference" href="#build-h" id="id219" name="id219">build.h</a></li>
|
||||
<li><a class="reference" href="#build-c" id="id220" name="id220">build.c</a></li>
|
||||
<li><a class="reference" href="#build-c" id="id219" name="id219">build.c</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#gnu-general-public-license" id="id221" name="id221">GNU General Public License</a></li>
|
||||
<li><a class="reference" href="#license-for-scintilla-and-scite" id="id222" name="id222">License for Scintilla and SciTE</a></li>
|
||||
<li><a class="reference" href="#gnu-general-public-license" id="id220" name="id220">GNU General Public License</a></li>
|
||||
<li><a class="reference" href="#license-for-scintilla-and-scite" id="id221" name="id221">License for Scintilla and SciTE</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
@ -5726,7 +5725,7 @@ Geany provide.</td>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a class="toc-backref" href="#id219" id="build-h" name="build-h">build.h</a></h2>
|
||||
<h2><a class="toc-backref" href="#id219" id="build-c" name="build-c">build.c</a></h2>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="33%" />
|
||||
@ -5741,35 +5740,19 @@ Geany provide.</td>
|
||||
</thead>
|
||||
<tbody valign="top">
|
||||
<tr><td>GEANY_BUILD_ERR_HIGHLIGHT_MAX</td>
|
||||
<td>Amount of build error messages which should
|
||||
be highlighted in the Compiler message
|
||||
window. This affects the special coloring
|
||||
<td>Amount of build error indicators to
|
||||
be shown in the editor window.
|
||||
This affects the special coloring
|
||||
when Geany detects a compiler output line as
|
||||
an error message and then highlight the
|
||||
an error message and then highlights the
|
||||
corresponding line in the source code.
|
||||
Usually only the first few messages are
|
||||
interesting because following errors are
|
||||
just aftereffects.</td>
|
||||
<td>100</td>
|
||||
just after-effects.
|
||||
All errors in the Compiler window are parsed
|
||||
and unaffected by this value.</td>
|
||||
<td>50</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a class="toc-backref" href="#id220" id="build-c" name="build-c">build.c</a></h2>
|
||||
<table border="1" class="docutils">
|
||||
<colgroup>
|
||||
<col width="33%" />
|
||||
<col width="48%" />
|
||||
<col width="20%" />
|
||||
</colgroup>
|
||||
<thead valign="bottom">
|
||||
<tr><th class="head">Option</th>
|
||||
<th class="head">Description</th>
|
||||
<th class="head">Default</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody valign="top">
|
||||
<tr><td>PRINTBUILDCMDS</td>
|
||||
<td>Every time a build menu item priority
|
||||
calculation is run, print the state of the
|
||||
@ -5787,7 +5770,7 @@ overriding the compile setting.</td>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id221" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
|
||||
<h1><a class="toc-backref" href="#id220" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
|
||||
<pre class="literal-block">
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
@ -6132,7 +6115,7 @@ Public License instead of this License.
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h1><a class="toc-backref" href="#id222" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
|
||||
<h1><a class="toc-backref" href="#id221" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
|
||||
<p>Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org></p>
|
||||
<p>All Rights Reserved</p>
|
||||
<p>Permission to use, copy, modify, and distribute this software and
|
||||
@ -6152,7 +6135,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
|
||||
<div class="footer">
|
||||
<hr class="footer" />
|
||||
<a class="reference" href="geany.txt">View document source</a>.
|
||||
Generated on: 2010-07-01 16:16 UTC.
|
||||
Generated on: 2010-07-01 17:04 UTC.
|
||||
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
||||
|
||||
</div>
|
||||
|
||||
@ -4754,29 +4754,23 @@ GEANY_MAX_AUTOCOMPLETE_WORDS How many autocompletion suggestions should 30
|
||||
Geany provide.
|
||||
============================== ============================================ ==================
|
||||
|
||||
build.h
|
||||
-------
|
||||
|
||||
============================== ============================================ ==================
|
||||
Option Description Default
|
||||
============================== ============================================ ==================
|
||||
GEANY_BUILD_ERR_HIGHLIGHT_MAX Amount of build error messages which should 100
|
||||
be highlighted in the Compiler message
|
||||
window. This affects the special coloring
|
||||
when Geany detects a compiler output line as
|
||||
an error message and then highlight the
|
||||
corresponding line in the source code.
|
||||
Usually only the first few messages are
|
||||
interesting because following errors are
|
||||
just aftereffects.
|
||||
============================== ============================================ ==================
|
||||
|
||||
build.c
|
||||
-------
|
||||
|
||||
============================== ============================================ ==================
|
||||
Option Description Default
|
||||
============================== ============================================ ==================
|
||||
GEANY_BUILD_ERR_HIGHLIGHT_MAX Amount of build error indicators to 50
|
||||
be shown in the editor window.
|
||||
This affects the special coloring
|
||||
when Geany detects a compiler output line as
|
||||
an error message and then highlights the
|
||||
corresponding line in the source code.
|
||||
Usually only the first few messages are
|
||||
interesting because following errors are
|
||||
just after-effects.
|
||||
All errors in the Compiler window are parsed
|
||||
and unaffected by this value.
|
||||
PRINTBUILDCMDS Every time a build menu item priority FALSE
|
||||
calculation is run, print the state of the
|
||||
menu item table in the form of the table
|
||||
|
||||
51
src/build.c
51
src/build.c
@ -60,6 +60,9 @@
|
||||
#include "toolbar.h"
|
||||
#include "geanymenubuttonaction.h"
|
||||
|
||||
/* Number of editor indicators to draw - limited as this can affect performance */
|
||||
#define GEANY_BUILD_ERR_HIGHLIGHT_MAX 50
|
||||
|
||||
|
||||
GeanyBuildInfo build_info = {GEANY_GBG_FT, 0, 0, NULL, GEANY_FILETYPES_NONE, NULL, 0};
|
||||
|
||||
@ -968,6 +971,8 @@ static GPid build_run_cmd(GeanyDocument *doc, gint cmdindex)
|
||||
static void process_build_output_line(const gchar *str, gint color)
|
||||
{
|
||||
gchar *msg, *tmp;
|
||||
gchar *filename;
|
||||
gint line;
|
||||
|
||||
msg = g_strdup(str);
|
||||
|
||||
@ -976,34 +981,30 @@ static void process_build_output_line(const gchar *str, gint color)
|
||||
if (! NZV(msg))
|
||||
return;
|
||||
|
||||
if (build_info.message_count < GEANY_BUILD_ERR_HIGHLIGHT_MAX)
|
||||
if (build_parse_make_dir(msg, &tmp))
|
||||
{
|
||||
gchar *filename;
|
||||
gint line;
|
||||
|
||||
build_info.message_count++;
|
||||
|
||||
if (build_parse_make_dir(msg, &tmp))
|
||||
{
|
||||
setptr(current_dir_entered, tmp);
|
||||
}
|
||||
msgwin_parse_compiler_error_line(msg, current_dir_entered, &filename, &line);
|
||||
if (line != -1 && filename != NULL)
|
||||
{
|
||||
GeanyDocument *doc = document_find_by_filename(filename);
|
||||
|
||||
if (doc && editor_prefs.use_indicators)
|
||||
{
|
||||
if (line > 0) /* some compilers, like pdflatex report errors on line 0 */
|
||||
line--; /* so only adjust the line number if it is greater than 0 */
|
||||
editor_indicator_set_on_line(doc->editor, GEANY_INDICATOR_ERROR, line);
|
||||
}
|
||||
color = COLOR_RED; /* error message parsed on the line */
|
||||
}
|
||||
g_free(filename);
|
||||
setptr(current_dir_entered, tmp);
|
||||
}
|
||||
msgwin_compiler_add_string(color, msg);
|
||||
msgwin_parse_compiler_error_line(msg, current_dir_entered, &filename, &line);
|
||||
|
||||
if (line != -1 && filename != NULL)
|
||||
{
|
||||
GeanyDocument *doc = document_find_by_filename(filename);
|
||||
|
||||
/* limit number of indicators */
|
||||
if (doc && editor_prefs.use_indicators &&
|
||||
build_info.message_count < GEANY_BUILD_ERR_HIGHLIGHT_MAX)
|
||||
{
|
||||
if (line > 0) /* some compilers, like pdflatex report errors on line 0 */
|
||||
line--; /* so only adjust the line number if it is greater than 0 */
|
||||
editor_indicator_set_on_line(doc->editor, GEANY_INDICATOR_ERROR, line);
|
||||
}
|
||||
build_info.message_count++;
|
||||
color = COLOR_RED; /* error message parsed on the line */
|
||||
}
|
||||
g_free(filename);
|
||||
|
||||
msgwin_compiler_add_string(color, msg);
|
||||
g_free(msg);
|
||||
}
|
||||
|
||||
|
||||
@ -26,8 +26,6 @@
|
||||
#ifndef GEANY_BUILD_H
|
||||
#define GEANY_BUILD_H 1
|
||||
|
||||
#define GEANY_BUILD_ERR_HIGHLIGHT_MAX 100
|
||||
|
||||
/* Order is important (see GBO_TO_GBG, GBO_TO_CMD below) */
|
||||
/** Geany Known Build Commands.
|
||||
* These commands are named after their default use.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user