errno is never reset to 0 by the system libraries, so if we test
its value we need to reset it to 0 before the call that may change
it to something else.
Fix spawnning command under Windows when they contain spaces in both
the executable and the arguments. Apparently system() quoting is
unexpected, and doesn't work properly if there is more than 2 quotes
in the whole command.
To work this around, spawn the command through `cmd.exe /S /C`.
To do this we change the internal types to only use types matched by
symbols_get_current_scope(). This is a bit of a hack, but the tag
types were already questionable and simply mapped to ones the
TagManager know.
This however merges Functions and Subroutines under the same top-level
item in the symbol list.
Custom command callback never checked that the doc was still valid.
Can still paste in the wrong doc if user closes and opens while
the command is running, but not crash.
This fixes 'Go to Tag definition' for parsed Python imports as before the import
statement was chosen as the definition while we prefer the class definition as
target.
This is a requirement for an upcoming Python parser fix. This new category
will be currently only used by Python, C and D parsers. Before this change,
in C & D extern variables were sorted into the category "Other", now they
have their own category.
* Add an initialization function ft_init()
* Add a function-like macro to call ft_init() with shorter arguments
* Search and replace old code with FT_INIT() usage
* Layout into columns and add documentation above
* Adds TITLE_NONE, TITLE_SCRIPT and TITLE_DOCUMENT.
* Only a few filetype titles were tweaked but we should review the
rest as we could use TITLE_SCRIPT and TITLE_DOCUMENT a lot more
probably.
* Make filetype_make_title() not care about GeanyFiletype type and
return result instead of internally setting ft state.
g_return_if_fail() puts itself its condition in a G_LIKELY() clause,
and nested G_LIKELY() lead to warnings about shadowed variables, as
well as not being of any use.
Also, hiding G_LIKELY() in a macro may lead to unexpected use of it
which may hint the compiler incorrectly.
In build_run_cmd() the script was not deleted when any one of
several errors occurred. The errors are not related to script
contents so it makes no sense to leave the script.
Also fixes failure to delete script if a working dir was set.
Although GtkIconFactory implements GtkBuildable properly and works just
fine, Glade can't handle it and keeps removing it upon save. So, drop
the automatic setup to a manual one so the UI description is editable
with Glade again, and which also has the small advantage of not
repeating the stock ID strings.
Properly exit when passed --list-documents, even if no other instance
were already running. This makes this option behave the same in any
case, making it easier to use in e.g. scripts.
Do not truncate the document list to the size of the buffer used for
communication.
Since we now read multiple times, we need to make sure to always send
ETX so a reader don't hang reading the next chunk if the data sent had
exactly the size of the buffer.
Change utils_parse_color() to use gdk_color_parse() and follow its
syntax, additionally supporting our "0x" prefix as a synonym for the
"#" prefix; and use this everywhere.
Also add utils_color_to_bgr() and utils_parse_color_to_bgr() to provide
conversion to the 24 bits BGR format used by Scintilla.