Revision: 5084
http://geany.svn.sourceforge.net/geany/?rev=5084&view=rev
Author: ntrel
Date: 2010-07-02 12:43:39 +0000 (Fri, 02 Jul 2010)
Log Message:
-----------
Parse lines in the Messages window even if Find in Files hasn't
been used yet (patch by Ji?\197?\153?\195?\173 Techet, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/msgwindow.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-02 12:19:00 UTC (rev 5083)
+++ trunk/ChangeLog 2010-07-02 12:43:39 UTC (rev 5084)
@@ -6,6 +6,9 @@
* src/ui_utils.c:
Fix only adding project base path to Find in Files history if it
isn't already there (oops).
+ * src/msgwindow.c:
+ Parse lines in the Messages window even if Find in Files hasn't
+ been used yet (patch by Jiří Techet, thanks).
2010-07-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c 2010-07-02 12:19:00 UTC (rev 5083)
+++ trunk/src/msgwindow.c 2010-07-02 12:43:39 UTC (rev 5084)
@@ -1010,6 +1010,7 @@
else if (line < 0 && string != NULL)
{
gchar *filename;
+
msgwin_parse_grep_line(string, &filename, &line);
if (filename != NULL && line > -1)
{
@@ -1042,7 +1043,7 @@
*filename = NULL;
*line = -1;
- if (string == NULL || msgwindow.find_in_files_dir == NULL)
+ if (string == NULL)
return;
/* conflict:3:conflicting types for `foo' */
@@ -1053,7 +1054,10 @@
data.file_idx = 0;
parse_file_line(&data, filename, line);
- make_absolute(filename, msgwindow.find_in_files_dir);
+
+ /* FIF dir should be set, but a plugin might not have set it */
+ if (msgwindow.find_in_files_dir != NULL)
+ make_absolute(filename, msgwindow.find_in_files_dir);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5083
http://geany.svn.sourceforge.net/geany/?rev=5083&view=rev
Author: ntrel
Date: 2010-07-02 12:19:00 +0000 (Fri, 02 Jul 2010)
Log Message:
-----------
Fix only adding project base path to Find in Files history if it
isn't already there (oops).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-02 12:05:43 UTC (rev 5082)
+++ trunk/ChangeLog 2010-07-02 12:19:00 UTC (rev 5083)
@@ -3,6 +3,9 @@
* doc/geany.txt, doc/geany.html:
Fix wording - restarting is required for hidden prefs.
File templates don't need manual reloading anymore.
+ * src/ui_utils.c:
+ Fix only adding project base path to Find in Files history if it
+ isn't already there (oops).
2010-07-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2010-07-02 12:05:43 UTC (rev 5082)
+++ trunk/src/ui_utils.c 2010-07-02 12:19:00 UTC (rev 5083)
@@ -1515,7 +1515,7 @@
GtkTreeIter iter;
model = gtk_combo_box_get_model(combo);
- if (!tree_model_find_text(model, &iter, 0, text))
+ if (tree_model_find_text(model, &iter, 0, text))
return; /* don't prepend duplicate */
gtk_combo_box_prepend_text(combo, text);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5082
http://geany.svn.sourceforge.net/geany/?rev=5082&view=rev
Author: ntrel
Date: 2010-07-02 12:05:43 +0000 (Fri, 02 Jul 2010)
Log Message:
-----------
Fix wording - restarting is required for hidden prefs.
File templates don't need manual reloading anymore.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-01 17:08:00 UTC (rev 5081)
+++ trunk/ChangeLog 2010-07-02 12:05:43 UTC (rev 5082)
@@ -1,3 +1,10 @@
+2010-07-02 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * doc/geany.txt, doc/geany.html:
+ Fix wording - restarting is required for hidden prefs.
+ File templates don't need manual reloading anymore.
+
+
2010-07-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* scintilla/LexCPP.cxx, src/highlighting.c:
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2010-07-01 17:08:00 UTC (rev 5081)
+++ trunk/doc/geany.html 2010-07-02 12:05:43 UTC (rev 5082)
@@ -4643,8 +4643,7 @@
<h3><a class="toc-backref" href="#id187" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h3>
<p>There are some rarely used preferences that are not shown in the Preferences
dialog. These can be set by editing the preferences file, then
-selecting <em>Tools->Reload Configuration</em> or restarting Geany. Search for the
-key name, then edit the value. Example:</p>
+restarting Geany. Search for the key name, then edit the value. Example:</p>
<blockquote>
<tt class="docutils literal"><span class="pre">brace_match_ltgt=true</span></tt></blockquote>
<p>The table below show the key names of hidden preferences in the
@@ -4903,8 +4902,7 @@
use them, choose the <em>New (with Template)</em> menu item from the <em>File</em>
menu.</p>
<p>By default, file templates are installed for some filetypes. Custom
-file templates can be added by creating the appropriate template file
-and then selecting <em>Tools->Reload Configuration</em> or restarting Geany. You can
+file templates can be added by creating the appropriate template file. You can
also edit the default file templates.</p>
<p>The file's contents are just the text to place in the document, with
optional template wildcards like <tt class="docutils literal"><span class="pre">{fileheader}</span></tt>. The fileheader
@@ -6135,7 +6133,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-07-01 17:04 UTC.
+Generated on: 2010-07-02 11:59 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>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2010-07-01 17:08:00 UTC (rev 5081)
+++ trunk/doc/geany.txt 2010-07-02 12:05:43 UTC (rev 5082)
@@ -4018,8 +4018,7 @@
There are some rarely used preferences that are not shown in the Preferences
dialog. These can be set by editing the preferences file, then
-selecting *Tools->Reload Configuration* or restarting Geany. Search for the
-key name, then edit the value. Example:
+restarting Geany. Search for the key name, then edit the value. Example:
``brace_match_ltgt=true``
@@ -4221,8 +4220,7 @@
menu.
By default, file templates are installed for some filetypes. Custom
-file templates can be added by creating the appropriate template file
-and then selecting *Tools->Reload Configuration* or restarting Geany. You can
+file templates can be added by creating the appropriate template file. You can
also edit the default file templates.
The file's contents are just the text to place in the document, with
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5081
http://geany.svn.sourceforge.net/geany/?rev=5081&view=rev
Author: ntrel
Date: 2010-07-01 17:08:00 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Limit build error editor indicators to 50, but parse all errors in
the Compiler tab (fixes #3019823).
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/build.c
trunk/src/build.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/ChangeLog 2010-07-01 17:08:00 UTC (rev 5081)
@@ -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>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/doc/geany.html 2010-07-01 17:08:00 UTC (rev 5081)
@@ -474,12 +474,11 @@
<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 @@
</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 @@
</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 @@
</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 @@
</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 @@
<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>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/doc/geany.txt 2010-07-01 17:08:00 UTC (rev 5081)
@@ -4754,29 +4754,23 @@
Geany provide.
============================== ============================================ ==================
-build.h
+build.c
-------
============================== ============================================ ==================
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
+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 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.
-============================== ============================================ ==================
-
-build.c
--------
-
-============================== ============================================ ==================
-Option Description Default
-============================== ============================================ ==================
+ 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
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/src/build.c 2010-07-01 17:08:00 UTC (rev 5081)
@@ -60,7 +60,10 @@
#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};
static gchar *current_dir_entered = NULL;
@@ -968,6 +971,8 @@
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 @@
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;
+ setptr(current_dir_entered, tmp);
+ }
+ msgwin_parse_compiler_error_line(msg, current_dir_entered, &filename, &line);
- build_info.message_count++;
+ if (line != -1 && filename != NULL)
+ {
+ GeanyDocument *doc = document_find_by_filename(filename);
- if (build_parse_make_dir(msg, &tmp))
+ /* limit number of indicators */
+ if (doc && editor_prefs.use_indicators &&
+ build_info.message_count < GEANY_BUILD_ERR_HIGHLIGHT_MAX)
{
- setptr(current_dir_entered, tmp);
+ 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);
}
- msgwin_parse_compiler_error_line(msg, current_dir_entered, &filename, &line);
- if (line != -1 && filename != NULL)
- {
- GeanyDocument *doc = document_find_by_filename(filename);
+ build_info.message_count++;
+ color = COLOR_RED; /* error message parsed on the line */
+ }
+ g_free(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);
- }
msgwin_compiler_add_string(color, msg);
-
g_free(msg);
}
Modified: trunk/src/build.h
===================================================================
--- trunk/src/build.h 2010-07-01 16:48:56 UTC (rev 5080)
+++ trunk/src/build.h 2010-07-01 17:08:00 UTC (rev 5081)
@@ -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.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5080
http://geany.svn.sourceforge.net/geany/?rev=5080&view=rev
Author: ntrel
Date: 2010-07-01 16:48:56 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Add item: print text size/zoom option.
Modified Paths:
--------------
trunk/TODO
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2010-07-01 16:22:45 UTC (rev 5079)
+++ trunk/TODO 2010-07-01 16:48:56 UTC (rev 5080)
@@ -8,6 +8,7 @@
Next version or later:
o better file template {filename} wildcard replacement +{BASENAME}
+ o print text size/zoom option
o documentation: list and explain filetype modes
o common default highlighting styles configurable for all
programming languages (done for C-like filetypes using
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5079
http://geany.svn.sourceforge.net/geany/?rev=5079&view=rev
Author: ntrel
Date: 2010-07-01 16:22:45 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Always use white background color when printing (except for text
with a white foreground) to save ink (should fix #2968998).
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/printing.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-01 14:33:41 UTC (rev 5078)
+++ trunk/ChangeLog 2010-07-01 16:22:45 UTC (rev 5079)
@@ -7,6 +7,9 @@
data/filetypes.common:
Add filetypes.common fold_symbol_highlight color setting.
Add API macro foreach_range().
+ * 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).
2010-06-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2010-07-01 14:33:41 UTC (rev 5078)
+++ trunk/doc/geany.html 2010-07-01 16:22:45 UTC (rev 5079)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2010-06-29" />
+<meta name="date" content="2010-07-01" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2010-06-29</td></tr>
+<td>2010-07-01</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.20</td></tr>
</tbody>
@@ -3052,6 +3052,12 @@
<p>Since Geany 0.13 there has been printing support using GTK's printing API.
The printed page(s) will look nearly the same as on your screen in Geany.
Additionally, there are some options to modify the printed page(s).</p>
+<div class="note">
+<p class="first admonition-title">Note</p>
+<p class="last">The background text color is set to white, except for text with
+a white foreground. This allows dark color schemes to save ink
+when printing.</p>
+</div>
<p>You can define whether to print line numbers, page numbers at the bottom of
each page and whether to print a page header on each page. This header
contains the filename of the printed document, the current page number and
@@ -6146,7 +6152,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-07-01 14:28 UTC.
+Generated on: 2010-07-01 16:16 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>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2010-07-01 14:33:41 UTC (rev 5078)
+++ trunk/doc/geany.txt 2010-07-01 16:22:45 UTC (rev 5079)
@@ -2784,6 +2784,11 @@
The printed page(s) will look nearly the same as on your screen in Geany.
Additionally, there are some options to modify the printed page(s).
+.. note::
+ The background text color is set to white, except for text with
+ a white foreground. This allows dark color schemes to save ink
+ when printing.
+
You can define whether to print line numbers, page numbers at the bottom of
each page and whether to print a page header on each page. This header
contains the filename of the printed document, the current page number and
Modified: trunk/src/printing.c
===================================================================
--- trunk/src/printing.c 2010-07-01 14:33:41 UTC (rev 5078)
+++ trunk/src/printing.c 2010-07-01 16:22:45 UTC (rev 5079)
@@ -491,6 +491,9 @@
dinfo->styles[i][BACK] = ROTATE_RGB(scintilla_send_message(
dinfo->doc->editor->sci, SCI_STYLEGETBACK, i, 0));
}
+ /* use white background color unless foreground is white to save ink */
+ if (dinfo->styles[i][FORE] != 0xffffff)
+ dinfo->styles[i][BACK] = 0xffffff;
dinfo->styles[i][BOLD] =
scintilla_send_message(dinfo->doc->editor->sci, SCI_STYLEGETBOLD, i, 0);
dinfo->styles[i][ITALIC] =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5076
http://geany.svn.sourceforge.net/geany/?rev=5076&view=rev
Author: ntrel
Date: 2010-07-01 11:49:30 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Add C++ lexer property fold.cpp.comment.explicit (patch sent); set
it disabled.
Modified Paths:
--------------
trunk/ChangeLog
trunk/scintilla/LexCPP.cxx
trunk/src/highlighting.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-06-30 12:15:13 UTC (rev 5075)
+++ trunk/ChangeLog 2010-07-01 11:49:30 UTC (rev 5076)
@@ -1,8 +1,16 @@
+2010-07-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * scintilla/LexCPP.cxx, src/highlighting.c:
+ Add C++ lexer property fold.cpp.comment.explicit (patch sent); set
+ it disabled.
+
+
2010-06-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/highlighting.c:
- Re-enable fold.comment for the C lexer - it was disabled to prevent
- //{ explicit folding, but that also disables stream comments /* */.
+ Re-enable fold.comment for lexers - it was disabled to prevent C
+ //{ explicit folding, but that also disables stream comment folding
+ /* */.
* tagmanager/tm_workspace.c, tagmanager/get.c:
Use g_free instead of free (patch by Daniel Marjamäki, thanks).
* src/editor.c:
Modified: trunk/scintilla/LexCPP.cxx
===================================================================
--- trunk/scintilla/LexCPP.cxx 2010-06-30 12:15:13 UTC (rev 5075)
+++ trunk/scintilla/LexCPP.cxx 2010-07-01 11:49:30 UTC (rev 5076)
@@ -379,10 +379,15 @@
WordList *[], Accessor &styler) {
// property fold.comment
- // This option enables folding multi-line comments and explicit fold points when using the C++ lexer.
+ // This option enables folding multi-line comments when using the C++ lexer.
+ bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
+
+ // property fold.cpp.comment.explicit
+ // Set this property to 0 to disable folding explicit fold points when fold.comment=1.
// Explicit fold points allows adding extra folding by placing a //{ comment at the start and a //}
// at the end of a section that should fold.
- bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
+ bool foldCommentExplicit = foldComment &&
+ styler.GetPropertyInt("fold.cpp.comment.explicit", 1) != 0;
// property fold.preprocessor
// This option enables folding preprocessor directives when using the C++ lexer.
@@ -421,7 +426,7 @@
levelNext--;
}
}
- if (foldComment && (style == SCE_C_COMMENTLINE)) {
+ if (foldCommentExplicit && (style == SCE_C_COMMENTLINE)) {
if ((ch == '/') && (chNext == '/')) {
char chNext2 = styler.SafeGetCharAt(i + 2);
if (chNext2 == '{') {
Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c 2010-06-30 12:15:13 UTC (rev 5075)
+++ trunk/src/highlighting.c 2010-07-01 11:49:30 UTC (rev 5076)
@@ -779,13 +779,13 @@
SSM(sci, SCI_MARKERSETBACK, SC_MARKNUM_FOLDERMIDTAIL,
invert(common_style_set.styling[GCS_MARGIN_FOLDING].foreground));
+ /* set some common defaults */
sci_set_property(sci, "fold", "1");
sci_set_property(sci, "fold.compact", "0");
sci_set_property(sci, "fold.comment", "1");
sci_set_property(sci, "fold.preprocessor", "1");
sci_set_property(sci, "fold.at.else", "1");
-
/* bold (3rd argument) is whether to override default foreground selection */
if (common_style_set.styling[GCS_SELECTION].bold)
SSM(sci, SCI_SETSELFORE, 1, invert(common_style_set.styling[GCS_SELECTION].foreground));
@@ -943,8 +943,10 @@
};
apply_filetype_properties(sci, SCLEX_CPP, ft_id);
+ apply_style_entries(sci, ft_id, styles, G_N_ELEMENTS(styles));
- apply_style_entries(sci, ft_id, styles, G_N_ELEMENTS(styles));
+ /* Disable explicit //{ folding as it can seem like a bug */
+ sci_set_property(sci, "fold.cpp.comment.explicit", "0");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.