228 Commits

Author SHA1 Message Date
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
Nick Treleaven
6eceb83d41 Make 'Open Selected File' first try the current file's directory,
falling back to the project base path if no file was found.
Add editor_get_default_selection() from get_default_text() in
search.c, to get the current selection or current word.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2172 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-14 17:30:59 +00:00
Enrico Tröger
bc180f0545 Don't add '>' when auto completing HTML tags when it's already there.
Fix wrong indentation when '{' and '}' are on the same line.      


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2169 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-12 13:01:43 +00:00
Enrico Tröger
e3201062c6 Update copyright information and change format of email addresses in source files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2150 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-06 18:11:57 +00:00
Enrico Tröger
de8caa6055 Remove obsolete SVNdiff plugin, use the VC Diff plugin.
Add option for amount of characters to trigger symbol completion.
Add document_find_by_filename to the plugin API.		


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2084 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-01 17:53:36 +00:00
Enrico Tröger
fabc1c9940 Improve usage of "Unfold all children" option and add some basic documentation for folding support.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2073 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-29 17:52:24 +00:00
Enrico Tröger
62b45d6326 Enable Shift+click on a fold point to unfold all possibly folded children (same as the pref "Unfold all children of a fold point").
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2068 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-22 17:48:59 +00:00
Enrico Tröger
b2141dd29d Fix crash when trying to add a multiline comment in filetypes which don't support it.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2063 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-21 17:14:58 +00:00
Enrico Tröger
4b43e762d0 Rename "Contruct autocompletion" to "Snippets".
Allow changing height of the symbol completion list even if automatic symbol is disabled, it still can be forced by keybinding.	 


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2044 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-12 09:27:43 +00:00
Enrico Tröger
b0109e93ca Remove unused unnecessary function utils_btoa().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2034 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-08 12:46:43 +00:00
Nick Treleaven
c1205dc504 Use newline as autocompletion list separator, so that reST entries
show correctly.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1995 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-31 12:56:12 +00:00
Enrico Tröger
00afcbcc86 Add special key wordchars to autocomplete.conf to let the user redefine used wordchars.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1960 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-18 19:55:21 +00:00
Nick Treleaven
5f688c6294 Apply patch from Catalin Marinas to add a 'newline strips trailing
spaces' pref (thanks).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1956 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-18 11:52:47 +00:00
Nick Treleaven
a2589f87fa Add Indent Type option in the Document menu.
Add 'Detect from file' Editor indentation pref.
Show TAB or SP for current document's indent type.
Minor editing of Document menu and editor Indentation prefs group.
Use GString for statusbar statistics.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1953 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-17 12:27:07 +00:00
Nick Treleaven
8d193436de Remove pos argument from sci_get_current_line(), because
sci_get_line_from_position() can be used instead and it's clearer.
Remove unused sci_get_line_end_styled() - it's also the same as
sci_get_line_from_position().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1904 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-25 16:44:33 +00:00
Nick Treleaven
5282ddbeb2 Fix bug with 'Delete lines' when cursor is at the start of a
multi-line selection.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1898 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-24 11:25:41 +00:00
Nick Treleaven
1c68618e6a Undo r1891 so that 'Delete lines' again includes the cursor line
even when at the start of a line - like Cut/Copy lines do.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1894 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-22 11:11:24 +00:00
Nick Treleaven
f38fbd5418 Make 'Delete lines' not include an extra line when whole lines are
selected.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1891 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-21 16:37:19 +00:00
Nick Treleaven
001cc916b4 Allow autocompletion on a line with trailing whitespace.
Add auto_complete_whilst_editing hidden preference.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1875 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-12 12:08:07 +00:00