Revision: 4184
http://geany.svn.sourceforge.net/geany/?rev=4184&view=rev
Author: ntrel
Date: 2009-09-14 11:53:08 +0000 (Mon, 14 Sep 2009)
Log Message:
-----------
Update syntax highlighting after changing the 'Invert syntax
highlighting colors' pref, instead of requiring a restart.
Remove filetypes.common invert_all option - use 'Invert syntax
highlighting colors' pref instead (closes #2854525).
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.common
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/geany.glade
trunk/src/filetypes.c
trunk/src/filetypes.h
trunk/src/highlighting.c
trunk/src/interface.c
trunk/src/main.c
trunk/src/prefs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/ChangeLog 2009-09-14 11:53:08 UTC (rev 4184)
@@ -2,6 +2,13 @@
* src/utils.c:
Fix opening filenames beginning with two dots (closes #2858487).
+ * src/interface.c, src/highlighting.c, src/prefs.c, src/filetypes.c,
+ src/filetypes.h, src/main.c, doc/geany.txt, doc/geany.html,
+ data/filetypes.common, geany.glade:
+ Update syntax highlighting after changing the 'Invert syntax
+ highlighting colors' pref, instead of requiring a restart.
+ Remove filetypes.common invert_all option - use 'Invert syntax
+ highlighting colors' pref instead (closes #2854525).
2009-09-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/data/filetypes.common
===================================================================
--- trunk/data/filetypes.common 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/data/filetypes.common 2009-09-14 11:53:08 UTC (rev 4184)
@@ -71,9 +71,6 @@
# 2 to draw the line below folded text
folding_horiz_line=2;0;false;false
-# only first argument is interpreted, sets whether all defined colours should be inverted
-invert_all=0;0;false;false
-
# only first and second argument is interpreted
# first argument: drawing of visual flags to indicate a line is wrapped. This is a bitmask of the
# values: 0 - No visual flags, 1 - Visual flag at end of subline of a wrapped line, 2 - Visual flag
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/doc/geany.html 2009-09-14 11:53:08 UTC (rev 4184)
@@ -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="2009-08-25" />
+<meta name="date" content="2009-09-10" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2009-08-25</td></tr>
+<td>2009-09-10</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.19</td></tr>
</tbody>
@@ -2151,12 +2151,8 @@
<h4><a class="toc-backref" href="#id105" id="display" name="display">Display</a></h4>
<dl class="docutils">
<dt>Invert syntax highlighting colors</dt>
-<dd><p class="first">Use white text on a black background and invert all colors.
-If the <tt class="docutils literal"><span class="pre">invert_all</span></tt> setting in <tt class="docutils literal"><span class="pre">filetypes.common</span></tt> is set, this
-option is always enabled. See <a class="reference" href="#special-file-filetypes-common">Special file filetypes.common</a>
-for details.</p>
-<p class="last">This option requires a restart of Geany. The value of this option</p>
-</dd>
+<dd>Invert all colors, by default this makes white text on a black
+background.</dd>
<dt>Show indendation guides</dt>
<dd>Show vertical lines to help show how much leading indentation there
is on each line.</dd>
@@ -3956,15 +3952,6 @@
</ul>
<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">folding_horiz_line=0;0;false;false</span></tt></p>
</dd>
-<dt>invert_all</dt>
-<dd><p class="first">Whether to invert all defined colors. This is useful if you like a
-dark background color(e.g. black) and do not want to change every
-single line. Please note, at time of writing this was only tested
-with the C syntax highlighting.</p>
-<p>Only first argument is interpreted. Set it to 1 to invert all
-colors.</p>
-<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">invert_all=0;0;false;false</span></tt></p>
-</dd>
<dt>line_wrap_visuals</dt>
<dd><p class="first">First argument: drawing of visual flags to indicate a line is wrapped.
This is a bitmask of the values:</p>
@@ -5413,7 +5400,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2009-09-10 16:55 UTC.
+Generated on: 2009-09-14 11:50 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 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/doc/geany.txt 2009-09-14 11:53:08 UTC (rev 4184)
@@ -1883,13 +1883,9 @@
```````
Invert syntax highlighting colors
- Use white text on a black background and invert all colors.
- If the ``invert_all`` setting in ``filetypes.common`` is set, this
- option is always enabled. See `Special file filetypes.common`_
- for details.
+ Invert all colors, by default this makes white text on a black
+ background.
- This option requires a restart of Geany. The value of this option
-
Show indendation guides
Show vertical lines to help show how much leading indentation there
is on each line.
@@ -3517,17 +3513,6 @@
*Example:* ``folding_horiz_line=0;0;false;false``
-invert_all
- Whether to invert all defined colors. This is useful if you like a
- dark background color(e.g. black) and do not want to change every
- single line. Please note, at time of writing this was only tested
- with the C syntax highlighting.
-
- Only first argument is interpreted. Set it to 1 to invert all
- colors.
-
- *Example:* ``invert_all=0;0;false;false``
-
line_wrap_visuals
First argument: drawing of visual flags to indicate a line is wrapped.
This is a bitmask of the values:
Modified: trunk/geany.glade
===================================================================
--- trunk/geany.glade 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/geany.glade 2009-09-14 11:53:08 UTC (rev 4184)
@@ -6480,7 +6480,7 @@
<child>
<widget class="GtkCheckButton" id="check_highlighting_invert">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Use white text on a black background and invert all colors, this option requires a restart of Geany</property>
+ <property name="tooltip" translatable="yes">Invert all colors, by default using white text on a black background</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Invert syntax highlighting colors</property>
<property name="use_underline">True</property>
Modified: trunk/src/filetypes.c
===================================================================
--- trunk/src/filetypes.c 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/src/filetypes.c 2009-09-14 11:53:08 UTC (rev 4184)
@@ -379,7 +379,7 @@
ft->comment_open = NULL;
ft->comment_close = NULL;
ft->group = GEANY_FILETYPE_GROUP_MISC;
-
+
#define TXT2TAGS
ft = filetypes[GEANY_FILETYPES_TXT2TAGS];
ft->lang = 37;
@@ -1576,3 +1576,24 @@
{
return (idx >= 0 && idx < (gint) filetypes_array->len) ? filetypes[idx] : NULL;
}
+
+
+void filetypes_reload(void)
+{
+ guint i;
+
+ /* save possibly changed commands before re-reading them */
+ filetypes_save_commands();
+
+ /* reload filetype configs */
+ for (i = 0; i < filetypes_array->len; i++)
+ {
+ /* filetypes_load_config() will skip not loaded filetypes */
+ filetypes_load_config(i, TRUE);
+ }
+ /* update document styling */
+ documents_foreach(i)
+ document_reload_config(documents[i]);
+}
+
+
Modified: trunk/src/filetypes.h
===================================================================
--- trunk/src/filetypes.h 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/src/filetypes.h 2009-09-14 11:53:08 UTC (rev 4184)
@@ -156,6 +156,9 @@
void filetypes_read_extensions(void);
+void filetypes_reload(void);
+
+
GeanyFiletype *filetypes_index(gint idx);
GeanyFiletype *filetypes_detect_from_document(GeanyDocument *doc);
Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/src/highlighting.c 2009-09-14 11:53:08 UTC (rev 4184)
@@ -100,7 +100,6 @@
{
GeanyLexerStyle styling[GCS_MAX];
FoldingStyle folding_style;
- gboolean invert_all;
gchar *wordchars;
} common_style_set;
@@ -393,7 +392,7 @@
static guint invert(guint icolour)
{
- if (common_style_set.invert_all)
+ if (interface_prefs.highlighting_invert_all)
return utils_invert_color(icolour);
return icolour;
@@ -565,9 +564,6 @@
1, 1, &tmp_style);
common_style_set.folding_style.marker = tmp_style.foreground;
common_style_set.folding_style.lines = tmp_style.background;
- get_keyfile_int(config, config_home, "styling", "invert_all",
- 0, 0, &tmp_style);
- common_style_set.invert_all = tmp_style.foreground;
get_keyfile_int(config, config_home, "styling", "folding_horiz_line",
2, 0, &tmp_style);
common_style_set.folding_style.draw_line = tmp_style.foreground;
@@ -596,8 +592,6 @@
common_style_set.styling[GCS_LINE_HEIGHT].background = tmp_style.background;
}
- common_style_set.invert_all = interface_prefs.highlighting_invert_all =
- (common_style_set.invert_all || interface_prefs.highlighting_invert_all);
get_keyfile_wordchars(config, config_home, &common_style_set.wordchars);
whitespace_chars = get_keyfile_whitespace_chars(config, config_home);
}
Modified: trunk/src/interface.c
===================================================================
--- trunk/src/interface.c 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/src/interface.c 2009-09-14 11:53:08 UTC (rev 4184)
@@ -3783,7 +3783,7 @@
check_highlighting_invert = gtk_check_button_new_with_mnemonic (_("Invert syntax highlighting colors"));
gtk_widget_show (check_highlighting_invert);
gtk_box_pack_start (GTK_BOX (vbox12), check_highlighting_invert, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (tooltips, check_highlighting_invert, _("Use white text on a black background and invert all colors, this option requires a restart of Geany"), NULL);
+ gtk_tooltips_set_tip (tooltips, check_highlighting_invert, _("Invert all colors, by default using white text on a black background"), NULL);
check_indent = gtk_check_button_new_with_mnemonic (_("Show indentation guides"));
gtk_widget_show (check_indent);
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/src/main.c 2009-09-14 11:53:08 UTC (rev 4184)
@@ -1182,8 +1182,6 @@
**/
void main_reload_configuration(void)
{
- guint i;
-
/* reload templates */
templates_free_templates();
templates_init();
@@ -1195,18 +1193,8 @@
/* reload filetype extensions */
filetypes_read_extensions();
- /* save possibly changed commands before re-reading them */
- filetypes_save_commands();
+ filetypes_reload();
- /* reload filetype configs */
- for (i = 0; i < filetypes_array->len; i++)
- {
- /* filetypes_load_config() will skip not loaded filetypes */
- filetypes_load_config(i, TRUE);
- }
- documents_foreach(i)
- document_reload_config(documents[i]);
-
/* C tag names to ignore */
symbols_reload_config_files();
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2009-09-14 11:14:23 UTC (rev 4183)
+++ trunk/src/prefs.c 2009-09-14 11:53:08 UTC (rev 4184)
@@ -56,6 +56,7 @@
#include "toolbar.h"
#include "stash.h"
#include "keyfile.h"
+#include "filetypes.h"
#ifdef HAVE_VTE
# include "vte.h"
@@ -739,10 +740,14 @@
GtkWidget *widget;
guint i;
guint autoclose_brackets[5];
+ gboolean old_invert_all = interface_prefs.highlighting_invert_all;
/* Synchronize Stash settings */
prefs_action(PREF_UPDATE);
+ if (interface_prefs.highlighting_invert_all != old_invert_all)
+ filetypes_reload();
+
/* General settings */
/* startup */
widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_load_session");
@@ -1581,7 +1586,7 @@
"font-set", G_CALLBACK(on_prefs_font_choosed), GINT_TO_POINTER(3));
g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "long_line_color"),
"color-set", G_CALLBACK(on_prefs_color_choosed), GINT_TO_POINTER(1));
- /* file chooser buttons in the tools tab
+ /* file chooser buttons in the tools tab
g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_make"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_make")); */
g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_term"),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4182
http://geany.svn.sourceforge.net/geany/?rev=4182&view=rev
Author: ntrel
Date: 2009-09-13 15:36:43 +0000 (Sun, 13 Sep 2009)
Log Message:
-----------
Add workaround for spacing '&' and '-' operators.
Ensure 2 blank lines after a function body.
Modified Paths:
--------------
trunk/scripts/fix-alignment.pl
Modified: trunk/scripts/fix-alignment.pl
===================================================================
--- trunk/scripts/fix-alignment.pl 2009-09-13 15:33:04 UTC (rev 4181)
+++ trunk/scripts/fix-alignment.pl 2009-09-13 15:36:43 UTC (rev 4182)
@@ -49,13 +49,16 @@
# make binary operators have *one* space each side
# operators must have longer variants first otherwise trailing operators can be broken e.g. "+ ="
# '*' ignored as could be pointer
- # '-' ignored as could be unary "-1"
- # '&' ignored as could be address-of "(type*)&foo"
my $ops = '<<=,<<,>>=,>>,<=,>=,<,>,||,|=,|,&&,&=,-=,+=,+,*=,/=,/,==,!=,%=,%,^=,^,=';
$ops =~ s/([|*+])/\\$1/g; # escape regex chars
$ops =~ s/,/|/g;
$line =~ s/([\w)\]])\s*($ops)\s*([\w(]|$)/$1 $2 $3/g;
+ # space binary operators that can conflict with unaries with cast and/or 'return -1/&foo'
+ # '-' could be unary "(gint)-j"
+ # '&' could be address-of "(type*)&foo"
+ $line =~ s/(\w)(-|&)\s*([\w(]|$)/$1 $2 $3/g;
+
# space ternary conditional operator
$line =~ s/\s*\?\s*(.+?)\s*:\s*/ ? $1 : /g;
@@ -73,19 +76,25 @@
# strip trailing space again (e.g. a trailing operator now has space afterwards)
$line =~ s/\s+$//g;
- $opt_write or print $line."\n";
- $opt_write and push(@lines, $line);
+ push(@lines, $line);
}
close(INPUT);
- $opt_write or return;
+ my $text = join("\n", @lines);
+ undef @lines; # free memory
+ $text .= "\n";
- open(OUTPUT, ">$infile") or die "Couldn't open $infile for writing: $!\n";
- foreach my $line (@lines)
- {
- print OUTPUT $line."\n";
+ # 1+ newline -> 2 newlines after function
+ $text =~ s/^}\n\n+([^\n])/}\n\n\n$1/gm;
+
+ if (!$opt_write) {
+ print $text;
}
- close(OUTPUT);
+ else {
+ open(OUTPUT, ">$infile") or die "Couldn't open $infile for writing: $!\n";
+ print OUTPUT $text;
+ close(OUTPUT);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4180
http://geany.svn.sourceforge.net/geany/?rev=4180&view=rev
Author: ntrel
Date: 2009-09-13 15:20:28 +0000 (Sun, 13 Sep 2009)
Log Message:
-----------
Add 'Compiler options & warnings' section.
Update Style section to be clearer about code alignment and show
some example code.
Other minor edits.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-13 11:23:14 UTC (rev 4179)
+++ trunk/ChangeLog 2009-09-13 15:20:28 UTC (rev 4180)
@@ -3,6 +3,11 @@
* src/keybindings.c:
Fix 'Reflow block' command when at the last paragraph and there's
no last newline (patch by Eugene Arshinov, thanks).
+ * HACKING:
+ Add 'Compiler options & warnings' section.
+ Update Style section to be clearer about code alignment and show
+ some example code.
+ Other minor edits.
2009-09-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2009-09-13 11:23:14 UTC (rev 4179)
+++ trunk/HACKING 2009-09-13 15:20:28 UTC (rev 4180)
@@ -48,12 +48,15 @@
$ diff -u originalpath modifiedpath > new-feature.patch
-Please make sure patches follow the style of existing code - In
-particular, use tabs for indentation. See `Style`_ and `Coding`_.
+.. note::
+ Please make sure patches follow the style of existing code - In
+ particular, use tabs for indentation. See `Coding`_.
-For Windows:
-Subversion (SVN): http://subversion.tigris.org/
-diff, grep, etc: http://mingw.org/ or http://unxutils.sourceforge.net/.
+Windows tools
+-------------
+* Subversion (SVN): http://subversion.tigris.org/
+* diff, grep, etc: http://mingw.org/ or http://unxutils.sourceforge.net/
+
See also the 'Building on Windows' document on the website.
File organization
@@ -91,7 +94,7 @@
If you're in any doubt when making changes to plugin API code, just ask us.
Plugin API/ABI design
----------------------
+^^^^^^^^^^^^^^^^^^^^^
You should not make plugins rely on the size of a struct. This means:
* Don't let plugins allocate any structs (stack or heap).
@@ -130,36 +133,89 @@
* Don't write long functions with a lot of variables and/or scopes - break
them down into smaller static functions where possible. This makes code
much easier to read and maintain.
-* Use GLib types and functions - e.g. g_free instead of free.
+* Use GLib types and functions - gint not int, g_free() not free().
* Your code should build against GLib 2.8 and GTK 2.8. At least for the
moment, we want to keep the minimum requirement for GTK at 2.8 (of
course, you can use the GTK_CHECK_VERSION macro to protect code using
later versions).
-* We currently try to support the old GCC 2.9.x compiler,
- so we always declare variables before statements. You can use
- -Wdeclaration-after-statement in your ./configure CFLAGS to warn about
- this.
-* You should also try to write ISO C90 code for portability, so always
+* Variables should be declared before statements. You can use
+ gcc's -Wdeclaration-after-statement to warn about this.
+* Don't let variable names shadow outer variables - use gcc's -Wshadow
+ option.
+
+Compiler options & warnings
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Use ``CFLAGS='-Wfoo' ./configure`` or ``CFLAGS='-Wfoo' ./autogen.sh``
+to set warning options (as well as anything else e.g. -g -O2).
+
+* Enable warnings - for gcc use '-Wall -W' (and optionally
+ -Wno-unused-parameter to avoid unused parameter warnings in Glade
+ callbacks).
+* You should try to write ISO C90 code for portability, so always
use C ``/* */`` comments and function_name(void) instead of
- function_name(). This is for compatibility with various Unix-like
- compilers. You can use -ansi in your CFLAGS to help check this.
+ function_name(). This is for compatibility with various Unix-like
+ compilers. You should use -ansi to help check this.
Style
------
+^^^^^
* We use a tab width of 4 and indent completely with tabs not spaces.
* Use the multiline comment ``/* */`` to comment small blocks of code,
functions descriptions or longer explanations of code, etc. C++ single
line comments will cause portability issues. The more comments are in
- your code the better.
+ your code the better. (See also ``scripts/fix-cxx-comments.pl`` in SVN).
* Lines should not be longer than about 100 characters and after 100
- characters the lines should be wrapped and more indented than the first
- line to highlight that the line is continued.
+ characters the lines should be wrapped and indented once more to
+ show that the line is continued.
* We don't put spaces between function names and the opening brace for
argument lists.
-* Try to fit in with the existing code brace indenting style, comments,
- operator spacing etc. It's not required for patches but it will save
- us having to manually reformat them.
+* Variable declarations come first after an opening brace, then one
+ newline to separate declarations and code.
+* 2-operand operators should have a space each side.
+* Function bodies should have 2 blank newlines after them.
+* Align braces together on separate lines.
+* Don't put assignments in 'if/while/etc' expressions.
+* if statements without brace bodies should have the code on a separate
+ line, then a blank line afterwards.
+* Use braces after if/while statements if the body uses another
+ if/while statement.
+* Try to fit in with the existing code style.
+.. note::
+ A few of the above can be done with the SVN
+ ``scripts/fix-alignment.pl``, but it is quite dumb and it's much better
+ to write it correctly in the first place.
+
+.. below tabs should be used, but spaces are required for reST.
+
+Example::
+
+ gint some_func(void);
+
+
+ gint function_long_name(gchar arg1, <too many args to fit on this line>,
+ gchar argN)
+ {
+ gint foo;
+
+ if (foo)
+ {
+ gint dir = -1; /* -1 to search backwards */
+
+ bar = foo;
+ if (bar != 7)
+ some_code(arg1, <too many args to fit on this line>,
+ argN - 1, argN);
+
+ some_func();
+ }
+ }
+
+
+ gint another_function(void)
+ {
+ ...
+
+
Libraries
---------
We prefer to use an unmodified version of Scintilla - any changes should
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4179
http://geany.svn.sourceforge.net/geany/?rev=4179&view=rev
Author: ntrel
Date: 2009-09-13 11:23:14 +0000 (Sun, 13 Sep 2009)
Log Message:
-----------
Fix 'Reflow block' command when at the last paragraph and there's
no last newline (patch by Eugene Arshinov, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/keybindings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-12 17:39:49 UTC (rev 4178)
+++ trunk/ChangeLog 2009-09-13 11:23:14 UTC (rev 4179)
@@ -1,3 +1,10 @@
+2009-09-13 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/keybindings.c:
+ Fix 'Reflow block' command when at the last paragraph and there's
+ no last newline (patch by Eugene Arshinov, thanks).
+
+
2009-09-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c, src/sciwrappers.c, src/sciwrappers.h,
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-09-12 17:39:49 UTC (rev 4178)
+++ trunk/src/keybindings.c 2009-09-13 11:23:14 UTC (rev 4179)
@@ -2101,8 +2101,12 @@
/* deselect last line break */
pos = sci_get_selection_end(sci);
line = sci_get_line_from_position(sci, pos);
- pos = sci_get_line_end_position(sci, line - 1);
- sci_set_selection_end(sci, pos);
+ if (line < sci_get_line_count(sci) - 1)
+ {
+ /* not last line */
+ pos = sci_get_line_end_position(sci, line - 1);
+ sci_set_selection_end(sci, pos);
+ }
}
split_lines(editor);
if (!sel)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4177
http://geany.svn.sourceforge.net/geany/?rev=4177&view=rev
Author: ntrel
Date: 2009-09-12 16:19:03 +0000 (Sat, 12 Sep 2009)
Log Message:
-----------
Fix out-of-date symbols.c note.
Modified Paths:
--------------
trunk/HACKING
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2009-09-11 00:06:00 UTC (rev 4176)
+++ trunk/HACKING 2009-09-12 16:19:03 UTC (rev 4177)
@@ -304,8 +304,8 @@
Set filetypes[GEANY_FILETYPES_FOO].lang = foo's parser number.
In symbols.c:
-Update init_tag_list() for foo, listing the tm_tag_* types corresponding
-to the s_tag_type_names strings used in foo.c for FooKinds.
+If your parser doesn't use C-like tag type names, update
+add_top_level_items() for foo, calling tag_list_add_groups().
GDB
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4175
http://geany.svn.sourceforge.net/geany/?rev=4175&view=rev
Author: frlan
Date: 2009-09-10 20:05:59 +0000 (Thu, 10 Sep 2009)
Log Message:
-----------
Changing default value for showing pdf and dvi
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetypes.latex
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-09-10 16:59:20 UTC (rev 4174)
+++ trunk/ChangeLog 2009-09-10 20:05:59 UTC (rev 4175)
@@ -1,3 +1,10 @@
+2009-09-10 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
+
+ * data/filetypes.latex:
+ Changing default value for showing pdf and dvi to ensure to take
+ *.pdf and *.dvi file.
+
+
2009-09-07 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* src/about.c, THANKS:
Modified: trunk/data/filetypes.latex
===================================================================
--- trunk/data/filetypes.latex 2009-09-10 16:59:20 UTC (rev 4174)
+++ trunk/data/filetypes.latex 2009-09-10 20:05:59 UTC (rev 4175)
@@ -41,8 +41,8 @@
compiler=latex --file-line-error-style "%f"
# it is called linker, but here it is an alternative compiler command
linker=pdflatex --file-line-error-style "%f"
-run_cmd=xdvi "%f"
-run_cmd2=xpdf "%f"
+run_cmd=xdvi "%e.dvi"
+run_cmd2=xpdf "%e.pdf"
[build-menu]
FT_00_LB=LaTeX -> _DVI
@@ -52,8 +52,8 @@
FT_01_CM=pdflatex --file-line-error-style "%f"
FT_01_BD=false
EX_00_LB=V_iew PDF File
-EX_00_CM=xpdf "%f"
+EX_00_CM=xpdf "%e.pdf"
EX_00_BD=false
EX_01_LB=_View DVI File
-EX_01_CM=xdvi "%f"
+EX_01_CM=xdvi "%e.dvi"
EX_01_BD=false
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.