246 Commits

Author SHA1 Message Date
Enrico Tröger
aceb1aa703 Remove remaining uses of doc->editor and use GeanyEditor directly.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3401 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-18 19:23:32 +00:00
Enrico Tröger
a9c02f5cf1 Fix too ambitious auto tag closing in HTML files inside embedded scripting languages.
Complete HTML styles in is_comment_style() and is_string_style().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3399 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-18 17:46:41 +00:00
Enrico Tröger
ae35f40e6e Make Ctrl-click working again to create rectangular selections when no braces and valid definitions are below the cursor (to whose would be jumped then).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3392 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-17 16:00:41 +00:00
Enrico Tröger
44b7d27b50 Add "editor-notify" to the plugin API.
This signal is emitted whenever something in an editor widget changes, e.g. a character was typed.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3391 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-17 16:00:18 +00:00
Nick Treleaven
4b000e09ae Move %ws and %newline% replacement into snippets-only code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3387 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-16 16:27:17 +00:00
Nick Treleaven
9fd3fd612c Fix replacing %ws% and %newline% in snippets (oops).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3384 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-16 13:16:33 +00:00
Enrico Tröger
8f7c80a15a Use wrapper instead of SCI_BRACEMATCH.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3381 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-15 21:20:53 +00:00
Enrico Tröger
860fd1a842 Replace the 'else if's by a switch contruct.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3379 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-15 21:20:04 +00:00
Enrico Tröger
ff8664150b Improve auto-closing of braces, brackets and quotes (patch by Guillaume de Rorthais, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3378 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-15 21:19:44 +00:00
Nick Treleaven
8a8c90f3ca Use wrappers instead of SCI_LINEFROMPOSITION, SCI_BRACEMATCH.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3376 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-15 16:30:54 +00:00
Nick Treleaven
6300da581f Add comment for editor_read_word_stem().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3373 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-12 13:32:13 +00:00
Nick Treleaven
7aa181f2e2 Make snippets only complete for the word stem to the left of the
cursor (#2390597).
Make snippets complete even when text is to the right of the
cursor and the hidden pref is not set, unless the snippet
completion key is space.
Fix possible memory leak when reading current word.
Add editor_read_word_stem().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3370 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-11 18:54:35 +00:00
Nick Treleaven
35b3b5895a Make Shift+Mouse wheel scroll the editor view horizontally
(#2410732).
Add function sci_scroll_columns().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3363 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-11 17:18:06 +00:00
Nick Treleaven
d204b0532e Fix GLib warning when user enters out of range line number in
toolbar.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3344 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-08 17:05:15 +00:00
Enrico Tröger
7c6ff4d5bb Add Line number and Markers margin settings to the prefs dialog.
Add View->Editor submenu and group there the Line numbers, Markers margin, Show white space, Show line endings and Show indentation guides settings.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3340 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-07 19:12:08 +00:00
Nick Treleaven
7994128e38 Rename sci_cmd() to sci_send_command() to match the plugin API and
fix the generated macro name.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3322 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-05 12:34:20 +00:00
Enrico Tröger
848f714ef1 Fix missing initialisation.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3321 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-05 12:11:32 +00:00
Enrico Tröger
ac72607ade Add auto-closing of braces, brackets and quotes (patch by Guillaume de Rorthais, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3319 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 20:19:20 +00:00
Enrico Tröger
0f8b8a2f2f Add new filetype 'YAML' (patch by Walery Studennikov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3290 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-29 12:51:50 +00:00
Enrico Tröger
13682cfd10 Add editor_get_calltip_text().
Add tooltips for the symbol list items.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3288 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-29 12:50:52 +00:00
Enrico Tröger
31a0755c3a Make templates_replace_all() working on GStrings to fix various string replacement problems when using custom file templates.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3268 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 18:19:36 +00:00
Nick Treleaven
ffffc759b1 Remove now-unnecessary checks for geany_object != NULL.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3266 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 17:33:35 +00:00
Nick Treleaven
a2ceb60e3a Make utils_free_pointers() take an arg_count argument to prevent
memory leaks.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3245 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 17:14:00 +00:00
Enrico Tröger
18095fca79 Note: this breaks the plugin API for Editor and Scintilla functions.
Rename all functions in editor.c and sciwrappers.c which are related to indicators for more consistency.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3238 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-16 17:54:28 +00:00
Nick Treleaven
56cf2bc7ef Make auto_table() use editor_insert_text_block().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3228 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-14 18:02:28 +00:00
Nick Treleaven
f07faeb9f7 Add editor_insert_text_block() newline_indent_size argument to add
fixed indentation on each newline, or -1 to read from insert_pos's
line.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3227 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-14 17:24:54 +00:00
Nick Treleaven
0ef7d92782 Fix bug with utils_string_replace_all().
Make utils_str_replace() call utils_string_replace_all() internally
(for better memory management and allowing replacements to match
search string).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3226 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-14 14:15:32 +00:00
Nick Treleaven
2c8bf0e2a9 Make editor_insert_text_block() transform any \n newline chars with
the correct line ending string.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3224 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-13 17:22:23 +00:00
Nick Treleaven
0cbbc2ede0 Make function editor_insert_text_block() interpret any \t tab chars
as indent widths when inserting text.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3220 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-13 16:29:10 +00:00
Nick Treleaven
a16dd54629 Fix indenting for Tabs & Spaces mode when inserting snippets.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3218 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-13 13:18:02 +00:00
Enrico Tröger
98cf47a6a8 When using custom file templates, add the extension of the template file to the filename of the new document.
Make {datetime} wildcard generally available for most template types.
Allow use of most available wildcards for custom file templates, too.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3202 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-10 18:27:23 +00:00
Nick Treleaven
12e29d7ebd Make Version Diff plugin set the indent type for diffs based on the
current file's indent type.
Add editor_set_indent_type() to the API.
Note: uses editor.h plugindata.h include.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3194 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-08 13:32:55 +00:00
Nick Treleaven
1f1cbd4523 Make Ctrl-click go to matching brace if there's no current word.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3193 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-08 13:14:09 +00:00
Enrico Tröger
efcdca4057 Don't auto close <hr> tags in HTML (closes #2226117).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3191 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-07 14:40:06 +00:00
Enrico Tröger
474a0b4410 Add new filetype 'Matlab' (closes #1938631, patch by Roland Baudin, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3190 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-07 14:39:45 +00:00
Nick Treleaven
8355e6a158 Fix snippets and smart indent using too much indentation when the
line contains whitespace after non-whitespace characters. This
might also have affected other features (auto table, etc).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3169 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-04 13:05:15 +00:00
Enrico Tröger
0324ed71f6 Add *_full variants of editor indicator functions to the plugin API for more control over indicators.
Add/Update some API docs.
Make the 'Mark' button for Find highlight the results with rounded boxes instead of marking the whole line.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3155 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-25 18:57:00 +00:00
Enrico Tröger
c946d4ef91 Replace Goto line text entry field in the toolbar with a spin button.
Remove dialogs_show_goto_line(), use the more generic dialogs_show_input_numeric() instead.
Increase limit of the maximum line number from 99999 to 100000000.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3146 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-23 20:55:06 +00:00
Nick Treleaven
c64897b5a3 Don't connect editor callbacks when creating the editor widget for
the split window plugin (they didn't work anyway, except for
Undo/Redo).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3102 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-16 11:39:34 +00:00
Enrico Tröger
5249fde432 Fix for the last fix: do it the proper way by ignoring any modifiers we don't want, only check for Ctrl, Alt and Shift.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3064 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-10 16:35:25 +00:00
Enrico Tröger
656b466df0 Fix Ctrl-click on a word when Numpad is enabled.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3063 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-10 15:18:36 +00:00
Enrico Tröger
45e4b0bb89 Fix wrong cursor positioning while line breaking when the last character on the line was a space.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3057 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 18:52:09 +00:00
Nick Treleaven
ddf488dcb5 Fix segfault when holding Alt and scrolling editor window.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3051 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 12:14:57 +00:00
Nick Treleaven
0117b3e5b2 Apply patch from Jason Oster to auto-update the line margin width as
lines are added (thanks; #2129157).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3021 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-29 12:44:31 +00:00
Enrico Tröger
087872260f Add new filetype 'Gettext translation file' (closes #2131985).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3018 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-28 16:32:49 +00:00
Enrico Tröger
72cbba79f7 Make 'Line Breaking' UTF-8 safe (to work with non-ASCII characters).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3014 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-27 14:06:43 +00:00
Enrico Tröger
ac07cf386e Fix unintentional switch fall-through (patch from Jason Oster, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3012 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-26 18:30:03 +00:00
Enrico Tröger
71dbd0f2d6 Make 'Previous/Next word part' keybindings configurable.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3011 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-26 18:29:42 +00:00
Nick Treleaven
46cae47182 Use GeanyDocumentPrivate instead of using inheritance for non-public
fields (this was unnecessary and meant using ugly casts).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3010 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-26 17:28:50 +00:00
Enrico Tröger
fb1d2abe5f Fix typo.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3009 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-26 16:49:52 +00:00