This makes the code more readable, potentially more future-proof (if
the actual string changes) and better style (catches possible typos at
build-time).
Use two spaces instead of tabs, spaces between function and opening
argument bracket, and various minor changes.
Add dummy gpointer to private struct so the class can be compiled
without modification.
This way, Geany's standard out and error can be read if started in verbose
mode until a key is pressed which makes debugging of command line
actions easier.
Fixes bug #3425969. Replace Geany escaping of session filepaths
with g_uri_escape_string (available now in 2.16) allowing any
punctuation characters in the path.
Remove type keywords caching function since it doesn't really speed up
anything and we don't care if the keywords change since they can/should
still be reloaded. This also prevents "leaking" a static GString once
when the application closes and saves a call to g_string_free() when the
type keywords have changed.
Rename document_update_highlighting() to document_update_type_keywords()
since no re-highlighting is needed when updating Scintilla keywords.
Scintilla highlights the new keywords automatically so this saves a call
to queue_colourise().
Remove update_type_keywords() function since this is now all handled
in the document_update_type_keywords() function. This function had a
comment about updating all documents when sci is NULL but it was never
used in this way since it was only called on document_load_config() which
always operates on a single document and the sci should not be NULL.
These leaks actually were not "real" leaks since the memory will anyway
be kept until quit. Fixing those only makes the code "cleaner" and
will prevent them to "hide" some other (real) ones at debug times.
The format of the error message output of the py_compile module has changed in
Python 2.6. The code now tries to detect the format and parse it accordingly.
Store a pointer to the stash pref for each row, so display/update is just
O(n) instead of O(n^2) time.
This changes the order prefs are updated in, but this doesn't matter.
This helps when trying to run build commands that don't exist;
the status bar message for that is now:
Process failed (The system cannot find the file specified.)
When using the commenting features (ex. toggle line commentation),
detect the the type of comments for the filetype of the line with
the caret rather than using the filetype of the current document.
Filetype is determined by the Scintilla state/style at the
beginning of the line where the caret is.
This does not fix the existing bug where using the commenting
features on lines with things like `<script>` will result in an
HTML-style comment to be wrapped around it and also where using
the commenting feature on a line with something like `<?php`
will not only wrap it in an HTML-style comment but it also won't
be able to uncomment the line.
This closes bug ID 2863829[1] and 3127598[2].
[1] https://sourceforge.net/tracker/?func=detail&aid=2863829&group_id=153444&atid=787791
[2] https://sourceforge.net/tracker/?func=detail&aid=3127598&group_id=153444&atid=787791
* Processed with rstrip-whitespace.py script added to scripts/ directory.
* Script run on all .c and .h files in src/ and plugins/ directories.
* Also remove more than one newline at the end of files.