96 Commits

Author SHA1 Message Date
Enrico Tröger
bb95dfdece Use templates_replace_all() also for snippet completion.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2774 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-13 10:56:21 +00:00
Enrico Tröger
d3adc32c19 Add support to use template wildcards in snippets.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2773 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-13 10:52:38 +00:00
Nick Treleaven
32cbcd33e3 Make line breaking work with multi-line comment completion and
'Newline strips trailing spaces' pref.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2759 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-07 11:38:15 +00:00
Enrico Tröger
b14568d1f8 Rename signal "populate-edit-menu" into "update-editor-menu".
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2755 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-05 09:37:37 +00:00
Nick Treleaven
8f4106b066 Fix possible segfault for XML tag completion when no '<' brace could
be found.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2750 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-03 17:13:34 +00:00
Enrico Tröger
fdbc255f79 Move the checks for HTML entity completion into an own function to increase readability.
Remove workaround for a wrong styling on last character and replace it with proper style reading (patch by Jason Oster, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2748 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-03 15:20:44 +00:00
Nick Treleaven
1525e93a7d Fix memory leak in utils_find_open_xml_tag() when size < 3, and only
allocate string when '<' found.
Factor insert_closing_tag() from handle_xml(), fixing a memory leak
when ignoring tags like <br>.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2747 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-03 14:39:49 +00:00
Enrico Tröger
1a1f244cc6 Move code to read snippets configuration to editor.c.
Split editor_snippets_free() from editor_finalize().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2738 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-30 16:14:55 +00:00
Enrico Tröger
2d5d52a08d Add plugin signal "populate-edit-menu" to notify plugins when the editing menu is shown.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2733 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-28 15:46:07 +00:00
Enrico Tröger
b2c8cd062c Attempt to make editor_find_current_word() Unicode-safe. Note: this can be done better.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2732 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-28 15:42:10 +00:00
Nick Treleaven
e49c35299a Add Go to Start/End of Line keybindings (#1996175).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2730 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-27 17:54:36 +00:00
Nick Treleaven
6e2ce22ec1 Move on_editor_expose_event(), create_new_sci() to editor.c.
Make on_editor_button_press_event() and on_editor_scroll_event()
static.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2720 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-20 17:10:51 +00:00
Enrico Tröger
a296a2c388 Scroll by page only when Alt key is held to avoid possible conflicts.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2716 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-19 17:42:40 +00:00
Enrico Tröger
e46a97a0e0 Allow scrolling page by page by holding down the Shift or Alt key (closes #1995405).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2713 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-19 17:09:46 +00:00
Enrico Tröger
b7802e2693 Allow symbol auto completion in embedded JavaScript in HTML files (closes #1997409).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2712 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-19 16:19:26 +00:00
Enrico Tröger
7fc218271a Improve scrolling on wrapped lines to avoid having search results on wrapped lines but outside of visible lines.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2711 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-19 16:13:19 +00:00
Enrico Tröger
9e98928ed1 Add "Replace spaces by tabs".
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2709 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-19 14:34:53 +00:00
Enrico Tröger
d03f72122a Get rid of GeanyDocument::is_valid, use the index value instead.
Remove DOC_IDX_* macros.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2693 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-15 15:24:44 +00:00
Enrico Tröger
d3439f8a17 Use document pointer instead of an index to the documents array everywhere in the core code.
Pass a document pointer to the callbacks of all "document-*" signals.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2692 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-15 13:35:48 +00:00
Enrico Tröger
89c0342ac1 Reshow a previously shown calltip if an auto completion list was cancelled.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2663 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-08 14:49:22 +00:00
Nick Treleaven
6cb19c0ae1 Revert use of SCN_PAINTED - this is called much more often than
SCN_UPDATEUI and slows down Geany.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2656 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-06 16:53:48 +00:00
Nick Treleaven
b449de93d3 Cancel any autocompletion list when completing a snippet.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2634 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-02 16:05:03 +00:00
Nick Treleaven
37e0d1f3f1 Move GeanyDocument GUI elements and saved_encoding to private
Document struct which inherits from GeanyDocument. This is to hide
implementation fields from the plugin API, so that we can change
them if necessary.
Add DOCUMENT() macro to convert a GeanyDocument* to a Document*.
Also move UNDO_*, FileEncoding to documentprivate.h.
Move undo_action struct to document.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2631 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-02 15:31:59 +00:00
Nick Treleaven
e6b428a9a4 Handle non-Scintilla GUI updates after SCN_PAINTED instead of
SCN_UPDATEUI to hopefully appear more responsive to typing.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2630 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-30 14:45:17 +00:00
Nick Treleaven
6acddad7cb Allow line breaking after typing any character, not just wordchars.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2629 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-30 14:25:22 +00:00
Nick Treleaven
be0d9e8ea7 Note: this breaks the plugin API.
Replace doc_array with documents_array, a pointer array. This is
necessary to avoid breaking the ABI every time a field is added to
GeanyDocument.
Remove deprecated pluginmacros.h documents macro, to avoid a
conflict.
Replace doc_list[] macro with documents[] macro, which returns a
GeanyDocument pointer.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2624 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-29 17:00:54 +00:00
Nick Treleaven
398efbd373 Note: this commit breaks the plugin API.
Split widget fields out of GeanyApp into GeanyMainWidgets, so other
data items can be added without breaking the plugin ABI.
Add GeanyData::main_widgets, and macro.
Rename treeview_notebook sidebar_notebook in GeanyMainWidgets.
Move tools_menu from GeanyData to GeanyMainWidgets.
Move statusbar out of GeanyApp (shouldn't be used directly).
Move ignore_callback out of GeanyApp.
Rename sci_goto_line() argument unfold, like sci_goto_pos().
Make utils_goto_file_pos(), utils_goto_line(),
utils_switch_document() into static functions (they are UI-related,
so shouldn't be in utils.c).
Move utils_goto_pos() to editor.c, add mark argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-22 14:41:28 +00:00
Nick Treleaven
192f4e13b5 Rename editor_auto_line_indentation() to
editor_smart_line_indentation().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2606 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-21 14:08:35 +00:00
Nick Treleaven
320e4b9d76 Refactor editor_auto_line_indentation().
Make auto-line indentation set the cursor to the beginning of
indentation for single line selections, so the user can fine-tune
indentation if necessary. For multiple line selections, select all
the lines after indenting.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2605 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-21 14:00:27 +00:00
Nick Treleaven
45dfa2e9fe Fix doxygen-1.4.6 warnings about undocumented function parameters
when using documentation comments e.g. for TODO.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2600 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 12:40:35 +00:00
Enrico Tröger
311b82ebb2 Rename document struct to GeanyDocument.
Rename filetype struct to GeanyFiletype.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2594 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 14:17:54 +00:00
Nick Treleaven
3a12da9daf Note: this commit breaks the plugin API (but is necessary so that in
future the ABI can stay stable when adding preferences).
Split up prefs into interface_prefs, toolbar_prefs, file_prefs,
search_prefs, tool_prefs, template_prefs, and add these to the
plugin API.
Move suppress_search_dialogs and search_use_current_word to
search_prefs, and rename accordingly.
Rename switch_msgwin_pages pref to switch_to_status.
Remove toolbar_ prefix for toolbar_prefs items.
Remove tool_ prefix for tool_prefs items.
Remove template_ prefix for template_prefs items.
Add Geany prefix for EditorPrefs.
Add Geany prefix for SearchPrefs.
Initialize search_prefs to zero in main.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2591 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 12:08:39 +00:00
Enrico Tröger
beb68832b3 Move several editing related functions from document.c to editor.c.
Fix two compiler warnings about non-literal format strings.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2588 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-15 13:43:29 +00:00
Enrico Tröger
b2cddc87a0 Move indicator functions from document.c into editor.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2587 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 17:58:56 +00:00
Enrico Tröger
392d1f863f Add preferences for default end of line characters for new files (closes #1895362) and to disable the automatic continuation of multi-line comments in C-like languages.
Enable multi-line continuation also for CSS files.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2580 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-14 15:36:27 +00:00
Nick Treleaven
d131023fe7 Add basic Line Breaking option in the Document menu. Line breaking
only works when typing characters past the line breaking column
number.
Add 'Line breaking column' editor pref.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2562 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 12:13:29 +00:00
Enrico Tröger
f1509de965 Fix a couple of wrong or missing checks to prevent auto completion in comments in several filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2465 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-10 17:46:13 +00:00
Enrico Tröger
3ba95e358d Backport a bugfix from Scite to fix folding problems.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2454 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-08 14:20:24 +00:00
Enrico Tröger
813849e8c8 Unfold hidden code when the fold point modified (e.g. commented out, fixes #1923350).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2427 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-28 16:16:55 +00:00
Nick Treleaven
056c296851 Fix Python auto-indentation when line endings are set to CR/LF.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2392 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-24 13:09:29 +00:00
Enrico Tröger
99a3d8e3c3 Add preference for not using the current word under the cursor when opening Find dialogs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2389 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-23 16:29:43 +00:00
Enrico Tröger
ec2bce2f94 Fix broken auto multiline comment with files in CR/LF mode.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2352 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-17 13:11:29 +00:00
Enrico Tröger
b7bfb2743a Replace all C++-style comments with usual C-like multi-line comments.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2287 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-27 13:17:29 +00:00
Nick Treleaven
3714cf498f Don't scroll the editor view if it is unnecessary when using Find
Next/Previous, Find Selected and when searching from the search bar.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2274 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-22 13:30:16 +00:00
Enrico Tröger
22d96653da Rename hidden pref auto_complete_whilst_editing to complete_snippets_whilst_editing.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2269 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-21 15:51:50 +00:00
Enrico Tröger
85f73129c0 Apply patch from Daniel Richard G. to fix to fix several compiler warnings, C89 violations and minor code problems (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2267 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-20 11:24:23 +00:00
Enrico Tröger
e4edda0fa2 Allow using Find In Files dialog even if no files are open (closes #1891818).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2250 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-12 12:04:21 +00:00
Enrico Tröger
e1edb51104 Add workaround for a Scintilla bug in HTML/PHP lexer which styles the last line of document wrong when in PHP mode.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2242 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-10 12:35:11 +00:00
Enrico Tröger
012622a209 Add two missing highlight styles to filetype Ruby.
Enable comment/uncomment for POD-like comments for filetypes Ruby and Perl.	 


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2179 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-17 14:30:40 +00:00
Nick Treleaven
62c0ad1493 Fix hidden lines after deleting a line that is a collapsed fold
point.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2175 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-16 13:07:04 +00:00