336 Commits

Author SHA1 Message Date
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
Enrico Tröger
befcb63e59 Ensure inserted templates always have proper line ending characters
according to the current document's preference.
This is also fixes problems with templates on Windows which had
always Unix line ending characters but now since they are read
from files, these have Windows line ending characters and had been
converted twice.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5114 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-08-01 17:20:50 +00:00
Nick Treleaven
49ed139da7 Fix scrolling the editor line in view after loading a session and
switching document tabs. Note this causes repainting so needs
improvement.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5098 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-09 12:12:23 +00:00
Nick Treleaven
2265fe283a Don't unnecessarily test G_FILE_TEST_IS_SYMLINK when testing
G_FILE_TEST_IS_REGULAR (patch by Dimitar Zhekov, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5089 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-05 12:03:27 +00:00
Nick Treleaven
fa9acc8caa Tidy comment; remove unnecessary assignment.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5088 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-05 11:59:08 +00:00
Nick Treleaven
0168e3e475 Use SCI_SETFIRSTVISIBLELINE for editor_scroll_to_line(). Note this
doesn't affect the bug with document switching not scrolling cursor
in view after loading a session.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5075 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-30 12:15:13 +00:00
Nick Treleaven
e7181e9295 Group undo action for Insert Multiline Comment.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5015 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-10 15:43:50 +00:00
Enrico Tröger
48064120f8 Small improvements to speed up quit process with many open documents.
Avoid calling gtk_notebook_remove_page() on exit as it takes a lot of time.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4921 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-16 17:43:24 +00:00
Enrico Tröger
e382869a16 Allow '+<number' and '-<number>' as values for Goto Line inputs to jump relative to the current line (closes #2997238).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4894 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-09 15:48:55 +00:00
Nick Treleaven
16c87d5e7e Warn user if hidden hard tab width setting is not 8.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4867 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-30 15:02:33 +00:00
Enrico Tröger
8c963d2829 Make string arguments const where appropriate (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:43:39 +00:00
Nick Treleaven
cbf9813632 Recalculate line margin width when zooming (fixes #2990553).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4853 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-22 16:02:45 +00:00
Nick Treleaven
6786e05e03 Support {pc} wildcard in snippets to escape percent char.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4852 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-22 13:01:45 +00:00
Nick Treleaven
cdd93f7ab8 Support {ob} and {cb} wildcards for snippets too (fixes #2937008).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4847 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-21 17:19:27 +00:00
Nick Treleaven
216bf2e5f5 Fix Class Builder plugin to use correct indentation instead of
always tabs.
Make editor_insert_text_block() only replace leading tabs for the
'Tabs' indent type; also group edits for undo.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4845 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-21 17:04:31 +00:00
Enrico Tröger
c499da1b4d Add a static global variable to monitor autocompletion mode in order to prevent cancellation of the struct/class (C/C++) auto completion list (patch by Thomas Martitz, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4840 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-19 20:42:44 +00:00
Nick Treleaven
ebfa9d75c3 Improve API docs for editor_insert_text_block().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4814 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-09 12:46:55 +00:00
Nick Treleaven
559aebd1b2 Fix inserting snippets with an indent when using Mac CR line
endings.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4812 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-09 12:09:16 +00:00
Nick Treleaven
18a7e2ef08 Fix indenting a snippet when there is whitespace after the
snippet key name.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4811 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-08 16:26:36 +00:00
Nick Treleaven
664333b8c8 Fix mem leak with snippets_find_completion_by_name().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4810 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-08 15:56:08 +00:00
Nick Treleaven
e7d790d926 Refactor snippets_complete_constructs().
Remove an unnecessary TODO.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4809 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-08 13:54:08 +00:00
Nick Treleaven
94577bb251 Fix showing '...' item last instead of first for document word
completion.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4805 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-06 17:11:36 +00:00
Enrico Tröger
09d0321657 Fix cursor positioning when toggling comments (patch by Thomas Martitz, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4788 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-25 23:00:59 +00:00
Nick Treleaven
138cbaa02f Use 3rd person (gets not get) for API function brief descriptions.
Avoid using 'convenience function' in API brief descriptions.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4757 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-12 18:15:48 +00:00
Nick Treleaven
7c27b1e009 Apply patch from Eugene Arshinov to add project long line marker
customisation (thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4751 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-10 16:20:34 +00:00
Enrico Tröger
49dff98485 Add preference for virtual spaces.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4724 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-07 10:36:27 +00:00
Enrico Tröger
b78451ab1c Fix wrongly auto-detected multiline comments (patch by Eugene Arshinov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4715 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-28 15:05:47 +00:00
Nick Treleaven
42ba9f41c8 Avoid some unnecessary reallocations, add comment.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4551 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-25 15:45:27 +00:00
Enrico Tröger
54d1b3ae7e Rename fold_symbol_click() to editor_toggle_fold().
Use editor_toggle_fold() when the 'Toggle current fold' keybinding was used to respect the 'Fold/unfold all children' preference (closes #2935053).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4542 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-24 16:30:29 +00:00
Enrico Tröger
d461084743 Add new special template wildcard "{command:...}" to use the output of a command in templates.
Adjust template functions to mostly work with GeanyDocuments.
Minor cleanups in the template code.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4539 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-24 14:52:46 +00:00
Enrico Tröger
56bb342899 Remove unused variable.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4525 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-17 12:08:30 +00:00
Frank Lanitz
aecf1d05d3 Remove automatic environment closing functions for LaTeX. Will be done by geanyLaTeX plugin in future
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4524 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-16 19:39:23 +00:00
Enrico Tröger
6165ef9203 Refactor templates_replace_all() into templates_replace_valist() to save some code duplication.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4522 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-12 21:10:46 +00:00
Frank Lanitz
383841ce01 Add editor_insert_text_block() to plugin API
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4521 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-12 18:44:38 +00:00
Enrico Tröger
7ba4a81181 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-01 22:55:18 +00:00
Enrico Tröger
09afb37dad Add editor_get_eol_char_name(), editor_get_eol_char_len() and editor_get_eol_char() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4508 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-29 18:23:54 +00:00
Enrico Tröger
366ebbe90f Fix LaTeX environment auto completion with CR/LF line endings.
Add some sanity checks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4496 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 15:38:14 +00:00
Frank Lanitz
a0c35e487b Extend auto_latex() function to check whether an environment has been closed within the next lines to avoid auto adding double \end{}.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4493 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 12:03:28 +00:00
Enrico Tröger
8153aa2877 Allow autocompletion for HTML entities even within a word.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4413 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-09 19:06:30 +00:00
Nick Treleaven
57d2d4181b Add general function sci_get_string() that works with any string
buffer messages that follow the Windows message convention.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4385 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-28 16:32:22 +00:00