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)
Then sci_get_style_at will only be called if start is less than max_pos.
It is just my humble suggestion.
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.
I'm interested in beginning to contribute to Geany. I'm a freshman CS
major and I often find myself with way too much free time and needing
something productive to do. As I've enjoyed using Geany, its something I'd
like to get involved in. However, open source (and projects in general
written by more than 2 people) is new to me, so I'll probably take it slow
for a while. Any advice is greatly appreciated.
Dear Geany Devs,
I recently switched from GeanyPRJ to Gproject. Since Gproject doesn't
support multiple open projects I have to switch between projects, but
it takes up to 4 minutes to close one project and open another. A
project consists of roughly 1000-2000 php-related files.
The "Generate tags for all project files" causes this massive delay,
but I really need that feature.
At work I have a 2-core CPU, where 1 is completely idle and on my
desktop at home there are 5 cores are doing nothing while generating
tags. Can't they be utilized to speed up the tag generation?
I noticed a global misuse / misunderstanding of the Autotools (mostly
about the dist mechanism) among the geany-plugins.
Attached a patch to correct the Autotools build system. I can split this
commit into several ones if needed (one for each plugin plus some more
global ones). I just need a bit of time to do so (fortunately, git helps
Quentin "Sardem FF7" Glidic
Le 17/04/2012 18:20, Nick Treleaven a écrit :
> How's it going?
Sorry for the long delays -- and also small activity -- recently. I
have/had a lot of non-Geany stuff to do and stuff, the whole story, you
> Lex mentioned in this mail:
> that (according to him) you are working to 'replace it'. Maybe he's
> exaggerating, but this sounds interesting. If you have time could you
> maybe send me a link to the IRC log, or better, explain a little about
> the work on the devel list?
That's true, I have a WIP on writing a new ctags management code. It is
far from being ready for production, and I'm not even sure the ideas in
it are really appropriate. But yes, there is a something :)
I finally committed it and pushed it so you can see it, comment, blame,
flame & more: see https://github.com/b4n/geany/tree/wip%2Fctagsmanager
A few points, as they comes to my mind:
* it is under the new ctagsmanager/ directory;
* it uses the same tag parsers tagmanager used, in ctagsmanager/ctags;
* it support asynchronous parsing (though not concurrent parsing);
* all types have different names than the tagmanager ones, though
currently the API is almost an 1:1 mapping -- and that's maybe a
* there is 2 backends as of today:
- a "simple" one that is simple and that doesn't waste (too much)
memory, but that searches in O(n);
- a "multi-cache" one that, as its name suggests, maintains multiple
caches (sorted tags arrays). it uses a little more memory and is
slower on insertion since it maintains several sorted lists, but a
search on an already existing cache is very fast.
In practice I haven't yet tested anything big enough to see any
difference in performances between these two backends, and that's
something that probably isn't worth bothering about for now.
* this "backend" abstraction might be really overkill, and maybe we
could do better without it?;
* tags (and most types) are reference-counted (so they aren't
necessarily duplicated, e.g. in the multicache backend);
* tag matching/finding is done using ctm_data_backend_find() (or a
convenience wrapper), which takes 2 functions for performing the
- a sort function, used to, heh, sort the tags to search and/or the
resulting list (the "simple" backend should use it to sort the
result; and the "multi-cache" backend uses it to sort the caches)
- a match function, use to check whether a tag should be included in
the results. Like the sort function it returns a strcmp()-like
value, with the only difference that it probably returns 0 for more
It is somewhat similar to what tagmanager did, but it's more flexible
-- and maybe complex, though many sort/match functions would already
* no pruning is done yet, so there is duplicate in the results;
* there is an (almost) working scope completeion implementation;
* ... I don't see anything to add, so I'll stop here :)
All this isn't of course written in stone: if we already redo a lot of
things, let's get something nice -- though IMO we'll always be better
than with tagmanager, since each time I wanted to touch it it took me
hours, and sometimes I even haven't been able to fix the problem
(thinking of e.g. scope completion...).
> Also, later in the thread he says that performance problems with
> resorting global and workspace tags cannot be fixed with the design of
> tagmanager. I've been working yesterday on improving this significantly
> by merging the new tags each time instead of resorting *all* the tags. I
> hope to commit this in the next few days.
Cool! I haven't done any profiling on either tagmanager or may new
attempt, so I can't tell what's actually slow, but any improvement is
good to have :)
Hi again, and excuse me for stuffing the list.
Actually there is 1/2 error. The plugin toolbar items are inserted
improperly, but added to plugin_items list in the right order. So
using "Customize Toolbar" and adding/removing items or otherwise
changing them fixes the order.
Patch attached. Not in git format, sorry.
I often ssh from the desktop machine (screen size of 2560x1440) into
my laptop (1200x800) and X-Display geany from my laptop back to the
desktop. If I then place the geany window in the bottom right hand
corner of the screen, exit geany and then reopen geany on the laptop,
the geany window ends up off screen.
The included patch checks the window position read from the preferences
file, checks to see if its off either the right hand side or bottom
of the screen and moves it back into a sensible position.
Erik de Castro Lopo