Hi!
I saw this code in src/symbols.c at line 1917:
while (sci_get_style_at(sci, start) != fn_style
&& start < max_pos) start++;
If start >= max_pos then sci_get_style_at will be called (with out of
bounds value?) and then the loop will bail out.
I suggest that the condition is reordered as:
while (start < max_pos
&& sci_get_style_at(sci, start) != fn_style)
start++;
Then sci_get_style_at will only be called if start is less than max_pos.
It is just my humble suggestion.
Best regards,
Daniel
Hi,
I'm sending my stack of patches against geany again, this time as individual patches. Here's the full list:
[PATCH 01/19] Prevent -Wmissing-prototypes report warning when compiling a plugin
[PATCH 02/19] Add signals for project options dialog opening and closing
[PATCH 03/19] Make the project menu accessible by plugins
[PATCH 04/19] Make it possible to change project patterns by plugins
[PATCH 05/19] Don't be annoying when not necessary
[PATCH 06/19] Make it possible for plugins to change the base directory of msgwindow
[PATCH 07/19] Open the file in the msgwindow even if no linenumber is specified
[PATCH 08/19] When closing tab, return to the document at the top of the MRU list
[PATCH 09/19] Use wider entry for project file path
[PATCH 10/19] New utils function to get relative path from one directory to another
[PATCH 11/19] File name in the project settings dialog shouldn't look it is editable
[PATCH 12/19] Use relative paths in the project files
[PATCH 13/19] Remove the "set" button from the project properties dialog
[PATCH 14/19] Rewrite tab switching queue
[PATCH 15/19] Do not insert --include= when the search pattern entry is empty
[PATCH 16/19] Use project patterns in the FIF dialog
[PATCH 17/19] Make the tab switching dialog a bit more useful
[PATCH 18/19] Use standard include paths for "open selected file"
[PATCH 19/19] Use per document indent sizes
Only some of them are required by gproject - others are just suggestions for improvements. I didn't explicitly distinguish between these two types of patches but it should be pretty clear from the description. There have been some minor changes since my last post - mainly the change of the FIF dialog to contain combo box for pattern selection and there are also some new patches - the detailed description is in the individual emails. Of course many of the patches are suggestions only so further discussion is welcome.
Cheers,
Jiri
Hi folks,
I saw that the SM-branch is merged with trunk on a regular basis, but
not sure what's the current status of that branch. Can someone help me
out there?
Cheers,
Frank
--
http://frank.uvena.de/en/
Hi,
As you may have noticed, when cursor is in the "virtual space" (beyond
eoln), our status bar always shows the last "real" column. This small
patch adds a new %v (and %V) format specification, which displays a
"virtual" column number, as if the line extends to the cursor position.
I haven't included sci_get_cursor_virtual_space() is the plugin
interface for now.
Since the virtual position normally requires 3 SSM()-s, and is less
likely to be used than the line and column, I placed the calls into
add_statusbar_statistics() instead of ui_update_statusbar().
--
E-gards: Jimmy
On Thu, Sep 16, 2010 at 19:27, Thomas Martitz
<thomas.martitz(a)student.htw-berlin.de> wrote:
> On 16.09.2010 02:23, Lex Trotman wrote:
>>
>> Hi Jiri,
>>
>> I couldn't get this to work at all, it printed "calling indent this
>> line" all the time but didn't indent :-(
>>
>> I only had half an hour so I couldn't investigate much.
>>
>
> I have the same experience. Auto-indentation doesn't seem to work anymore
> (e.g. when hitting enter after on a line that ends with {, or when typing
> }).
I have just re-tested it again and it works on my machine (I have
forgotten one trace in the code - that's what you see in the console).
A quick question: have you read the commit log?
This patch makes it possible to specify several regex patterns for every
filetype which determine under what condition the indentation is performed.
The pattern variables are specified under the [settings] section of the
given filetype and their value is the regex to be used. The variables are
as follows:
* indent_this_line_regex - the match is performed after every keystroke
and if the regex matches, the indentation is performed on the current
line
* indent_next_line_regex - the match is performed only when enter is
pressed. The indentation is applied on the next line
* unindent_this_line_regex - like indent_this_line_regex but
unindents instead
* unindent_next_line_regex - like indent_next_line_regex but indents instead
Comments and strings are detected from the lexer so these can be ignored
inside the patterns. For instance these are very basic rules for GNU
indent style:
indent_next_line_regex=^.*\\{[[:blank:]]*$
unindent_this_line_regex=^[[:blank:]]*\\}$
indent_this_line_regex=^[[:blank:]]+\\{$
unindent_next_line_regex=^[[:blank:]]*\\}[[:blank:]]*$
By commenting-out the last two lines you get ANSI indentation style.
If you replace \\{ and \\} with begin and end, respectively, you
get analogous rules for pascal. Notice the double-escaping of { and } -
the first escape sequence is for the keyfile ini format (so for the
regex itself \\ becomes \).
This means that in order to make it work e.g. for C, you have to edit
~/.config/geany/filedefs/filetypes.c
(or the corresponding file under /usr/local/share/geany) and add
indent_next_line_regex=^.*\\{[[:blank:]]*$
unindent_this_line_regex=^[[:blank:]]*\\}$
indent_this_line_regex=^[[:blank:]]+\\{$
unindent_next_line_regex=^[[:blank:]]*\\}[[:blank:]]*$
under the [settings] section (+ restart geany). Please let me know if
it works (but also in the opposite case ;-).
Jiri
>
> Best regards.
> _______________________________________________
> Geany-devel mailing list
> Geany-devel(a)uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
>
Hi,
Whilst opening doc/geany.html I found it takes >5s on my machine to
load. It's a big document though, still perhaps the HTML tag parser
performance could be improved.
But now we have tag reparsing, editing geany.html becomes painful. I
know we can disable reparsing, but what else could we do to improve the
situation? It's not urgent to solve this problem, unless we want to make
reparsing off by default.
@Matthew: That sounds like a good idea (after the release)
@Lex: That makes sense. After this weekend I'll still have time, but
it'll be more sparse. I'd like to be a part of it; so let me know what
we/I need to do to get this going. Thanks!
Josh
Hi,
Is there some specific distro or platform that sets the oldest GTK+
version Geany needs to support? I had a conversation with Enrico on IRC
some time back and he explained that Geany supports older GTK+ versions
so that "enterprise" and similar distros which have really old packages
are able to still able to compile/run it.
So I was just curious *specifically* what distro(s) and version(s) sets
the oldest version of GTK+ that Geany should support?
In case it's of any interest to anyone, I just did some searching around
and here are some distro and GTK+ versions I could find:
RHEL 5 - GTK+ 2.10
RHEL 6 - GTK+ 2.18
Fedora 8 - GTK+ 2.12
Fedora 10 - GTK+ 2.14
Fedora 11 - GTK+ 2.16
Fedora 12 - GTK+ 2.18
Fedora 13 - GTK+ 2.20
Debian Lenny - GTK+ 2.12
Debian Lenny (backports) - GTK+ 2.18 or GTK+ 2.20
Debian Squeeze - GTK+ 2.20
Ubuntu Hardy - 2.12
Ubuntu Lucid - 2.20
Cheers,
Matthew Brush
Hi Guys
I want to implement a new feature it will have close interaction with
the sidebar->open_files (module ?)
b) the new feature will be triggered every time a 'document-activate'
signal is sent
c) It will then need to update the model(treeview) in "sidebar->open_files"
Now my question is this since I then need to add fields (2) to the
enum below and do some other' work' on the sidebar_openfiles widget.
It will be difficult and 'ugly' to do it in a plugin ?
It was thinking of just adding the 'feature' to geany itself with a
config-option to turn it off and on ?
I will of course do a proof of concept and then submit the diff/patch ?
file:sidebar.c
/* documents tree model columns */
enum
{
DOCUMENTS_ICON,
DOCUMENTS_SHORTNAME, /* dirname for parents, basename for children */
DOCUMENTS_DOCUMENT,
DOCUMENTS_COLOR,
DOCUMENTS_FILENAME
DOCUMENTS_NEWFIELD_1 /* just to illustrate */
DOCUMENTS_NEWFIELD_2 /* just to illustrate */
}
Best Regards
Jacques du Rand
Hi,
just one very quick and possibly stupid idea. How about getting rid of
the 0 version prefix and calling the next release 1.0? This would be
just numbering change, not some milestone based on features that have
to be implemented (similarly to renumbering linux kernel from 2.6.x to
3.0).
Rationale: the 0.xx versioning scheme makes an impression that Geany
is something very unstable that crashes every five minutes and whose
first release was made a few months back. Instead, Geany is a very
stable and reliable editor with lots of features and several years of
history.
I know there are some 1.0 TODOs here:
http://www.geany.org/Documentation/ToDo
like the ABI stability for plugins and other features. But
1. Will the ABI be ever considered stable? Is it really needed? (All
the plugins I know are open source and the combined plugin project is
kept in sync with the development release so there's no real problem
even if the API changes).
2. I think there's no need to require some specific features for the
1.0 release. The current set of features makes already a very good
editor and extra features can always be introduced in later versions.
I already find Geany more usable for my needs than editors having 2011
as their version number so I believe it deserves the 1 prefix. What is
your opinion?
Cheers,
Jiri