Use same text in Split Window menu as in Keybindings dialog.
Also, translate "Side by side" as "Izquierda y derecha" ("left and right") rather than "Yuxtapuestos" ("juxtaposed") which is a rather weird (and inaccurate) word.
Some highlights:
* Fixes handling of comments
* Adds support for attribute and namespace selectors
* Adds support for @supports blocks
* Fixes tag type for many selectors
* Adds support for pseudo-classes with arguments
The issue was introduced in b646424ddb715382a937d233a75bc684c22e18ec as
it removed the default handler that used to destroy the infobar.
Now, the infobar is properly closed, but only if the action succeeded.
Closes#375.
Strict dependency on fnmatch was removed in 52076d19e8fe7ab41ebc92928e.
We still have an optional dependency on it from CTags, but I don't
think we use this code, and anyways the checks we had for the optional
path to be taken were incorrect, so it was never actually used.
So, drop the dependency on libibrety for Windows builds, and fix the
remaining checks for an optional fnmatch so if it is found it can
actually be used.
document_new_file_if_non_open() and ui_focus_current_document() only make sense
when files where actually opened, but the preceeding
configuration_load_session_files() only loads the file names into the global
session_files variable, from which the files are actually opened by a later
call to configuration_open_files(). These two calls should be done after that
one and the callers generally do this already.
"Execute commands" (from the Set Build Commands dialog) is translated to Spanish as if it were a sentence (like "Execute these commands"), but it's actually a name ("<language> commands", "Independent commands", and "Execute commands"; so it means "Commands for 'execute'"). Therefore, +"Comandos de ejecución" is a better translation than -"Ejecutar comandos".
By loading e.g. a huge DB dump into memory we could run out of memory.
Check the size of the file and determine whether to use file parsing
or buffer parsing.
Give up early if LANG_IGNORE set - there's no need to read the file in
this case.
Use the same (or compatible) sorting criteria everywhere.
Add tm_tag_attr_line_t to sort options so even after merging file tags
into workspace tags, the same tags defined at different lines are preserved
and not removed as duplicates.
Sort type before scope because it's cheaper to compare (string vs int comparison).
For some reason, the above changes make the sorting performance worse.
Simplify the tag comparison function a bit and reorder the case statements
in the switch to match the sort order. This (again not sure why), makes the
performance like before.
Previously, after finishing the while loop TRUE was returned - this is
wrong because the while was running because parsing was unsuccessful.
Make it work the same way as in ctags (parser() always succeeds,
parser2() returns whether to retry or not).
(The return value actually isn't used, it's just to make sure we know
what we are doing.)
With the previous TMWorkspace API it was possible to make the workspace
inconsistent by e.g. removing source files and forgetting to update
workspace. This could lead to non-obvious and not immediately visible
crashes.
The new set of the public (but also Geany private) API calls always
updates the workspace accordingly and neither of the calls can lead
to an inconsistent state of the workspace.
In addition, perform some minor cleanups and simplifications - unify
parsing from buffer and from file, support "parsing" of 0-sized buffers
and improve documentation.
Manage the list the same way as workspace tags_array by the fast tag removal
and merge. Thanks to this, typename tags don't have to be extracted from
tags_array periodically, which speeds up editing.
Even though the binary search requires expensive string comparisons,
there are just log(n) of them to find the tag in the workspace array
and the result is much faster than scanning the array linearly (this
of course works only under the condition that
len(source_file->tags_array) << len(workspace_array)
This is however satisfied for big projects (and doesn't matter for small
projects).
Also make the tm_tags_find() function more user friendly by returning
tagCount 0 when no tags found.
Instead of qsort() it's possible to use g_ptr_array_sort_with_data() with
similar performance. Unfortunately it seems there's no bsearch_with_data()
anywhere so the patch uses a modified bsearch() implementation from libc
(still probably cleaner than passing arguments using static variables).
Lazy initializing various member pointers doesn't bring any real performance
improvement but it requires lots of additional NULL checks - get rid of
this.
Make some more cleanups on the way.
In addition, remove success/failure return values from tm_workspace_add_source_file()
and tm_workspace_remove_source_file() which have no real use.
Avoid "utility" parameters like do_free for which we already have API calls
and which actually don't perform any free if the source file isn't
in TM. Clarify when to set the update_workspace parameter.
The placement of this function in tm_source_file is not right - by moving
it to the workspace we can make the source file unaware of the existence
of the workspace (no inclusion of tm_workspace.h in tm_source_file any
more). Also change tm_source_file_new() so it doesn't offer the source file
update.
After this change
* TMWorkspace knows TMSourceFile and TMTag
* TMSourceFile knows TMTag
* TMTag knows TMSourceFile
Set them also when they are NULL in the project (which happens when new
project is created) because otherwise there are left-over values from
the previous project.
Since plugins don't have direct access to the project file,
only through the project-save signal, they need some way to emit this
signal when saving their preferences outside the project dialog,
which is what this function does.