4425 Commits

Author SHA1 Message Date
Colomban Wendling
f99e627bb0 Fix folding of the very last line in a level when unfolding children
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.
2013-11-23 00:45:39 +01:00
Colomban Wendling
cff36e7497 R: properly display sources and libraries in the symbol list 2013-11-20 18:41:11 +01:00
Colomban Wendling
1dfc1077c7 Fix crash in fallback mime icon loading code under GTK3 2013-11-18 22:22:57 +01:00
Colomban Wendling
1f2279aefe Always use proper functions argument lists 2013-11-10 01:43:10 +01:00
Colomban Wendling
39fa004619 Fasten utils_tidy_path() a little and fix possible leaks in it
Fix possible leaks with bad paths, and also speed up some part of the
function by avoiding unnecessary allocations and string length
computations.
2013-11-07 23:11:15 +01:00
Colomban Wendling
c074817b8b Fix 2 unlikely memory leaks 2013-11-07 22:57:40 +01:00
Colomban Wendling
1d8dd84a47 Fix some small type issues in printf formats 2013-11-07 21:28:23 +01:00
Colomban Wendling
5c22c9d73e R has braces 2013-11-04 17:42:05 +01:00
Colomban Wendling
7b2f39a852 Remove an unused variable and plug a theoretical memory leak 2013-11-04 16:05:25 +01:00
Colomban Wendling
b2f4717ad3 Plug a memory leak on Windows 2013-11-03 23:35:55 +01:00
Colomban Wendling
5918532ab2 Explicit a valid cast 2013-11-03 22:31:00 +01:00
Colomban Wendling
cb588a1b82 Plug a possible memory leak 2013-11-03 22:30:55 +01:00
Colomban Wendling
0cb139638f Plug a memory leak 2013-11-03 22:18:50 +01:00
Colomban Wendling
bc6c345153 Remove an unused variable that could be leaked 2013-11-03 22:18:26 +01:00
Colomban Wendling
47609ec102 Plug a possible memory leak 2013-11-03 01:52:12 +01:00
Colomban Wendling
02852b33b0 Simplify utils_get_hex_from_color() and plug a possible memory leak in it 2013-11-03 01:51:03 +01:00
Colomban Wendling
fd18b7455c Plug a possible memory leak
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.
2013-11-02 22:10:32 +01:00
Nick Treleaven
6a19a4488d Add info on how g_spawn is broken on Windows 2013-10-31 13:54:31 +00:00
Colomban Wendling
b645eccf6e Do not ignore keys inside inherited groups
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.
2013-10-15 16:17:59 +02:00
Nick Treleaven
d51079d598 Fix mingw-gcc 'ordered comparison of pointer with integer zero' warning 2013-10-10 12:44:15 +01:00
Colomban Wendling
1ab97fe2e0 Plug a memory leak when reading misnamed tag files
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 ;)
2013-09-25 00:00:44 +02:00
Colomban Wendling
e4eacef82b Plug a memory leak
Thanks to Pavel Roschin for spotting it.
2013-09-24 16:23:48 +02:00
Colomban Wendling
af3421e688 Plug a memory leak
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.
2013-09-23 21:54:30 +02:00
Nick Treleaven
b428042278 Add sci_word_start_position, sci_word_end_position wrappers 2013-09-19 14:15:17 +01:00
Nick Treleaven
6d2f26c494 Don't ignore word matches that vary only by case
The user needs to see all case variants, even when they want searching
to be done case-insensitively (which isn't supported yet).
2013-09-19 13:56:48 +01:00
Nick Treleaven
dcfbf22cf2 Don't allocate initial size based on autocompletion_max_entries
The user may have set that too high.
2013-09-19 13:56:46 +01:00
Colomban Wendling
4786796e9a Fix build (oops, sorry) 2013-08-20 11:54:01 +02:00
Colomban Wendling
1fe7b4848e Fix printing under Windows
For some reason the Scintilla widget's Pango context don't have a
resolution set on Windows, so we get an invalid one.  Fix this by
correctly peek the resolution from the map if the context doesn't
have one by itself.

https://developer.gnome.org/pango/stable/pango-Cairo-Rendering.html#pango-cairo-context-get-resolution

Thanks to Matthew Brush for debugging this!

Closes #961.
2013-08-20 11:51:45 +02:00
Matthew Brush
4e924817b3 Use empty string on win32 when no print command
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.
2013-08-18 20:59:31 -07:00
Colomban Wendling
82f82ed372 Use GLib's portable version gethostname(): g_get_host_name()
Drop our own portability layer and use GLib's one instead (which
actually does exactly the same as our own).

Thanks to Matthew for spotting this.
2013-08-18 00:52:48 +02:00
Igor Shaula
4c3730caf7 LexPowerShell fixes and improvements
* fix here-string highlighting
* add doccomment keyword highlighting
* add #region folding

Closes #132
2013-08-15 19:51:17 -07:00
Igor Shaula
df589a9d52 Add PowerShell filetype
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.
2013-08-15 19:44:33 -07:00
Matthew Brush
d44dfdb9ac Save configuration when plugin manager dialog is closed
Closes #62
2013-08-15 18:53:21 -07:00
Ypnose
b11a3adb7b Add detection support for various Shell scripts
* Add shebang detection of mksh and tcsh.
* Add file extension detection of mksh, tcsh, and the various
"profile" shell scripts.

Closes #126
2013-08-15 14:48:06 -07:00
Edward Hutchins
01b7191d66 Added hashbang detection for node=>javascript.
Closes #149
2013-08-15 13:54:44 -07:00
Nick Treleaven
c615d8431f Don't call getenv twice 2013-08-15 17:52:13 +01:00
exbb2
09e7d8398f Haskell filetype improvements and support for Literal Haskell
Closes #155 and also closes #139
2013-08-14 23:16:39 -07:00
canou
b518770dea Add support for DOS, OS/2 and Windows batch files
* 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
2013-08-14 23:04:35 -07:00
Nick Treleaven
0998f1c19c Make code more readable by renaming poorly named macros NZV and NVL
Closes #159
2013-08-14 21:54:20 -07:00
Nick Treleaven
6d33485337 Fix warning 'comparison between signed and unsigned integer expressions'
With gcc on Windows.
2013-08-11 14:53:35 +01:00
Nick Treleaven
c4f98d85cb Use proper string comparison for portability 2013-08-11 10:57:53 +01:00
elextr
f15f61768d Fix sign comparison warning
Since the previous line ensured len is < 100, just casting it is fine.
2013-08-05 12:13:42 +10:00
Colomban Wendling
458f4f2e75 Don't warn when trying to close a document when none are open
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]
2013-07-21 13:50:25 +02:00
elextr
8d3085b61c Add C++ member pointer operator to scope autocomplete operators
C++ member pointers use the syntax ->* so the scope autocomplete
list was showing after -> then disappearing when * was typed.
Fixes #907 h.
2013-07-18 13:00:06 +10:00
elextr
cac1115ced Prevent reading past start of Scintilla buffer
A quick check seemed to show Scintilla does not check the minimum
value is positive, so just check here to be safe and log message
if it fails.
2013-07-18 12:36:42 +10:00
Colomban Wendling
6e902613b3 Improve some test ordering
Spotted by Daniel Marjamäki, thanks.
2013-07-16 19:13:41 +02:00
Colomban Wendling
b016e132fd Java: Report enums and fix parsing them 2013-07-15 17:42:00 +02:00
Yosef Or Boczko
9ae90f3f87 Fix the my last name and update the my e-mail
Signed-off-by: Frank Lanitz <frank@frank.uvena.de>
2013-07-14 23:41:14 +02:00
Colomban Wendling
d91c532f95 Remove a few dead assignments
Spotted by clang --analyze.
2013-07-13 23:00:43 +02:00
Colomban Wendling
f23b7267cf Fix possible dereference of NULL pointer
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.
2013-07-13 22:13:07 +02:00