4389 Commits

Author SHA1 Message Date
Colomban Wendling
0eec7764af Fix truncation of the data retrieved with --list-documents
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.
2013-12-17 16:17:21 +01:00
Colomban Wendling
98b82550a8 Plug a few possible small memory leaks 2013-12-05 21:39:59 +01:00
Colomban Wendling
ddf67a8586 VTE: properly use the default value for invalid configured colors 2013-12-05 20:18:27 +01:00
Colomban Wendling
4aff511b01 Remove unnecessary allocation for VTE color settings 2013-12-05 20:16:54 +01:00
Colomban Wendling
69f1cc7136 Remove useless rotate_rgb() 2013-12-04 15:49:47 +01:00
Colomban Wendling
4ce6409e89 Remove useless utils_invert_color() 2013-12-04 15:46:05 +01:00
Colomban Wendling
8980970630 Unify color parsing
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.
2013-12-04 15:31:17 +01:00
Colomban Wendling
1590007862 Remove an unnecessary allocation 2013-12-04 14:59:05 +01:00
Colomban Wendling
3522e81d73 Merge branch 'wip/color-parsing-improvements' 2013-12-03 03:09:41 +01:00
Colomban Wendling
f07b5457d6 Simplify fold toggling code using higher-level Scintilla API 2013-12-02 23:19:44 +01:00
Colomban Wendling
3759562d7c Simplify reading highlighting colors with new utils_parse_color()
Drop redundant code converting # and short formats to hex colors now
utils_parse_color() can parse them.
2013-12-02 22:58:54 +01:00
Colomban Wendling
ebde42617a Accept colors with only 1 digit per channel in utils_parse_color()
AKA short HTML color notation.
2013-12-02 22:53:35 +01:00
Colomban Wendling
11a2f0ee91 Properly validate input in utils_parse_color() 2013-12-02 22:44:40 +01:00
Colomban Wendling
507005ca54 Rename utils_strtod() to utils_parse_color()
Rename the function to a more sensible name, and remove unnecessary
arguments.  Now, format (# or 0x) is auto-detected.
2013-12-02 22:38:11 +01:00
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