Nick Treleaven
57b043666c
Remove snippets_global_pattern global and use user_data instead.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5731 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-19 16:43:23 +00:00
Nick Treleaven
a89ba90b15
Add utils_string_find() to search in a fixed range.
...
Change utils_string_replace() to just replace a fixed number of
characters.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5730 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-19 16:36:29 +00:00
Nick Treleaven
06f9d7e068
Fix multiple snippet cursor positions for Tabs + Spaces mode.
...
Simplify editor_insert_snippet() code now we use cursor marker
strings.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5729 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-19 16:04:31 +00:00
Nick Treleaven
0b2d16a41a
Add function utils_string_replace() to replace in a fixed range.
...
Remove utils_string_replace_helper() and update cursor marker code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5726 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-15 16:59:15 +00:00
Nick Treleaven
69c5d1f15e
Fix snippets bug: {ob}pc{cb} replaced by '%' instead of {pc}.
...
Refactor snippets_make_replacements() using geany_cursor_marker.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5725 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-14 17:37:46 +00:00
Colomban Wendling
b5c8b63216
Avoid triggering autocompletion on PHP open tags ( closes #3199442 )
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5724 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-13 21:55:31 +00:00
Nick Treleaven
8a817e694b
Make utils_build_path() return a copy for safety.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5721 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-13 12:59:20 +00:00
Colomban Wendling
a788a38240
Revert "Don't update parent WorkObjects when updating one in real-time"
...
This reverts commit 877cc1d97acd185cc7e0e88bb0b014fb74e16072.
This commit broke calltips, we need another fix for it.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5711 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-11 15:54:43 +00:00
Enrico Tröger
f34622e8ad
Ignore scrolling events in on_update_ui().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5702 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-10 12:08:24 +00:00
Colomban Wendling
2d06cd6c5a
Don't set font twice for line numbers and braces
...
No need to set the font for some specific styles that are set up anyway
when we set the font for all styles from 0 to STYLE_MAX.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5700 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-08 01:35:58 +00:00
Nick Treleaven
bbe0472a0d
Use STYLE_MAX instead of 127 for editor_set_font(). This fixes a
...
crash in the Split Window plugin when changing filetype (patch by
Matthew Brush, thanks; fixes #3255968 ).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5653 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-30 12:20:18 +00:00
Colomban Wendling
8640d845d0
Don't update parent WorkObjects when updating one in real-time
...
Updating the parent may lead to performance issues if an object have
too many parents since they are updated recursively.
Parent objects are still updated when saving the file.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5642 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-28 20:36:06 +00:00
Colomban Wendling
7698bf60a7
Improve usage of G_(UN)?LIKELY()
...
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.
These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:18 +00:00
Colomban Wendling
4cfedde35a
Fix a few warnings and style
...
* Don't use strlen(..) > 0 or == 0, simply check the first character
against 0;
* Fix a return without a value (my bad in last commit);
* Fix storing a literal in a non-const string.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5610 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-20 16:02:52 +00:00
Colomban Wendling
441bab9d3b
Add new filetype setting "comment_single"
...
This provides separated single-line and multiline comment support.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-20 15:02:22 +00:00
Colomban Wendling
8e79a2255a
Prefer prepend elements to lists rather than append them
...
This is for better performances since appending to a list means walking
it to find the last element to append to. When the list ordering
matters, simply reverse the list after prepengins.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5586 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-10 22:27:04 +00:00
Colomban Wendling
67cd5dbd13
Add possibility to update symbol list in IDLE time
...
Enabled by default, using a minimal delay of 250ms between two updates.
Also add a preference to configure this in Geany's UI, under
Preferences -> Editor -> Completion.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5557 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:46:32 +00:00
Enrico Tröger
ec408fa4b9
Add filetype Cobol (based on a patch by Seth Keiper).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5533 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-30 15:03:51 +00:00
Enrico Tröger
e7e9410c5c
Ensure the editor widget has the focus when the editor menu is called.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5532 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-30 13:48:21 +00:00
Enrico Tröger
6ac2623208
Update copyright information.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
467450fdce
Scroll to the current line when moving the cursor to the next
...
cursor position in a snippet (#3139490 ).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5495 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-12-22 13:44:41 +00:00
Nick Treleaven
a8e0cfb395
Typo in editor_get_[indent_]prefs() dox.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5433 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 17:40:30 +00:00
Nick Treleaven
ff6354d833
Remove unnecessary 'global' from long line editor pref field names.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5432 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 17:36:29 +00:00
Nick Treleaven
a29d75af2c
Add editor_get_prefs() instead of editor_get_long_line_*()
...
functions. This general function can be extended to support
various project and document overrides.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5431 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 17:25:58 +00:00
Nick Treleaven
ddefb0a0b4
Add API functions (patch by Eugene Arshinov, thanks):
...
Move editor.c: is_{string,comment,code}_style() functions to
highlighting.c, add to API.
Add editor_find_snippet(), editor_insert_snippet(),
utils_find_open_xml_tag() to API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5409 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-16 15:07:40 +00:00
Nick Treleaven
cb9982480f
Make Reflow Lines/Block command use the current indented block, not
...
the whole paragraph, which could have mixed indentation.
Fix memory leak and off-by-one bug on first line when using Select
Paragraph command.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5408 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-16 13:26:04 +00:00
Nick Treleaven
9e7515450a
Don't use XML tag auto-indentation when '</' is to the right of the
...
cursor; allow auto-indentation when XML tag auto-closing is also
enabled.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5406 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-15 13:06:11 +00:00
Nick Treleaven
3c558f52c5
Fix wrong snippet indentation when original cursor line has
...
non-indentation whitespace (patch by david, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5397 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-11 13:27:34 +00:00
Nick Treleaven
eba0571fb6
Add xml_indent_tags filetype setting for documents using the
...
HTML/XML lexers (patch by Eugene Arshinov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5392 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-10 17:47:55 +00:00
Nick Treleaven
e38f2f6a17
Add 'Project->Apply Default Indentation' menu command to override
...
every document's indentation settings.
Improve 'Indentation' section docs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5386 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-08 18:15:14 +00:00
Nick Treleaven
e37b8eab76
Respect 'Smart' home key for Shift+Alt+Home (patch by Dimitar
...
Zhekov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5381 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-08 12:10:17 +00:00
Nick Treleaven
0a6f825926
Respect 'Smart' home key for Shift+Home ( fixes #3100290 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5350 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-01 16:16:20 +00:00
Nick Treleaven
dbb9a1b2b8
Fix not autocompleting when breaking lines.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5343 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-29 15:00:42 +00:00
Nick Treleaven
eae0f24ba4
Simplify line breaking using SCI_NEWLINE message.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5336 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-27 16:28:28 +00:00
Nick Treleaven
568f1853d2
Remove unnecessary uses of FILETYPE_ID() macro with
...
GeanyDocument::file_type.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5323 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-25 17:24:47 +00:00
Nick Treleaven
3c6212544c
Auto-indent after an HTML/XML line with a missing closing tag (patch
...
by Eugene Arshinov, thanks).
Behaviour only applies if XML tag autoclosing is off.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5322 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-25 16:58:13 +00:00
Nick Treleaven
a274363275
Move HTML automatic <table> tag completion into a 'table' snippet
...
so the user can decide when to use it (patch by Eugene Arshinov,
thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5320 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-25 16:07:15 +00:00
Nick Treleaven
3367e67393
Use editor_get_eol_char() instead of inline copy.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5304 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-20 11:38:37 +00:00
Nick Treleaven
14d751dd87
Don't cache overridden lexer properties.
...
Add foreach_strv() to plugin API.
Add utils_strv_join().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5280 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-05 11:07:10 +00:00
Nick Treleaven
0f63274d8b
Avoid global variable.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5279 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-04 14:33:21 +00:00
Nick Treleaven
1b6b5210eb
Read snippet keybindings from system keyfile also.
...
Add keybinding example to default snippet.conf.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5278 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-04 14:29:44 +00:00
Nick Treleaven
75a366c1e3
Rename snippets_init -> snippets_load.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5274 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-04 10:41:06 +00:00
Nick Treleaven
ae70850596
Add snippet keybinding support for keys in user snippets.conf (based
...
on patch by Eugene Arshinov, thanks). No docs yet.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5271 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-01 15:08:43 +00:00
Nick Treleaven
45399a19f8
Refactor editor_snippets_init().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5270 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-01 14:28:05 +00:00
Enrico Tröger
a29174086a
When commenting/uncommenting with single-line comment characters, ignore any end of line characters before evaluating the current line.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5259 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-26 18:02:36 +00:00
Nick Treleaven
e664c8344f
Allow per-document indent width setting (patch by Jiří Techet,
...
updated by Erik de Castro Lopo - thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5228 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-14 15:01:29 +00:00
Nick Treleaven
9c527a8063
Remove duplicate checks.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5218 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-09 17:00:41 +00:00
Nick Treleaven
c867de1041
Use Octave lexer instead of Matlab to support Octave # comment char.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5174 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-17 14:07:58 +00:00
Enrico Tröger
0f7d1928cc
Add editor_goto_pos() to the plugin API.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5164 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-15 17:44:31 +00:00
Nick Treleaven
75a681b15a
Revert r4840 scope completion mode as it sometimes breaks
...
autocompletion.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5123 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-10 16:12:24 +00:00