From d84ca7ae3d76eed560182a57949d0e1185f6ac3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Mon, 9 Jan 2006 17:56:50 +0000 Subject: [PATCH] added CTRL+D commentation for filetype Conf git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@113 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/sci_cb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sci_cb.c b/src/sci_cb.c index 7267a50e..93da0ceb 100644 --- a/src/sci_cb.c +++ b/src/sci_cb.c @@ -35,10 +35,9 @@ static gint link_start, link_end, style; static gchar indent[100]; -// callback func called by all editors when a signals arises +// callback func called by all editors when a signal arises -void -on_editor_notification(GtkWidget* editor, gint scn, gpointer lscn, gpointer user_data) +void on_editor_notification(GtkWidget* editor, gint scn, gpointer lscn, gpointer user_data) { struct SCNotification *nt; ScintillaObject *sci; @@ -225,6 +224,7 @@ on_editor_notification(GtkWidget* editor, gint scn, gpointer lscn, gpointer user } } + void sci_cb_get_indent(ScintillaObject *sci, gint pos, gboolean use_this_line) { // very simple indentation algorithm @@ -767,6 +767,7 @@ void sci_cb_do_comment(gint idx) else if (lexer == SCLEX_PYTHON || lexer == SCLEX_PERL || lexer == SCLEX_MAKEFILE + || lexer == SCLEX_PROPERTIES || lexer == SCLEX_BASH) { // skip lines which are already comments @@ -893,7 +894,7 @@ void sci_cb_auto_multiline(ScintillaObject *sci, gint pos) if (((lexer == SCLEX_CPP && style == SCE_C_COMMENT) || (lexer == SCLEX_HTML && style == SCE_HPHP_COMMENT))) - { /// FIXME is sci_get_char_at() much slower than a line buffer? + { while (isspace(sci_get_char_at(sci, i))) i--; if (sci_get_char_at(sci, i) == '/' && sci_get_char_at(sci, i - 1) == '*') return;