Fix an off-by-one mistake resulting on the very last line of a nested
folded level not to be unfolded when recursively unfolding it's parent.
This was only visible when the last fold point was only one line long,
otherwise unfolding the (N-1)th line was enough.
Closes#1007.
There is no need to check doc->real_path since the usage is NULL-safe,
and if it actually is empty or NULL it isn't a bug in the caller itself
anyway, and this could leak.
When inheriting a group in a filetypes file, do not ignore local keys.
This allows for partial overrides of the parent group, like:
[settings=Parent]
key=value
All keys from Parent's group "settings" would be imported, but now the
"key" key wouldn't be ignored anymore and would override a "key" key
from the group copied from Parent if it exists.
Don't leak the file name if we can't determine to which filetype it
belongs. Thanks to Pavel Roschin for spotting this.
Also, remove an useless second function indirection that simply made
the code harder to understand. This will make Matthew happy ;)
Do not evaluate a macro argument multiple times if it gets passed an
expression, especially if that expression allocates memory.
Thanks to Pavel Roschin for spotting the leak.
In the preferences dialog it would show a single
quote because the print command couldn't be found
and the NULL prematurely terminated the g_strconcat()
call, leaving a single quote in the print command
entry.
Thanks to Lex for finding where the problem was.
Windows PowerShell is a command-line shell and associated scripting language
which comes out of the box with Windows 7/Server 2008/8/Server 2012.
Original lexer from Scintilla is used.
* Uses existing LexOthers.cxx from Scintilla already in use by Geany
* "identifier" style mapping goes to "string" for better presentation
even if it's semantically incorrect, we'll change it back if it causes
issues for anyone.
* Filetype configuration and keywords taken from Don Ho's Notepad++.
Closes#160
When using the document close keybinding, it is legitimate for the
callback to be called even if there are no documents open, so properly
check for this.
Closes [bugs:#941]
Use g_set_error() instead of doing it manually and forgetting to check
whether the pointer is NULL or not before dereferencing it.
Spotted by clang --analyze.