From e7206f35b881c07c707e112906b8cd5e2b5281c3 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Tue, 2 Nov 2010 12:55:17 +0000 Subject: [PATCH] Add sci_get_lexer() to plugin API. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5352 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 6 ++++++ plugins/geanyfunctions.h | 2 ++ src/plugindata.h | 3 ++- src/plugins.c | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb5da40fd..de5b90ff8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-11-02 Nick Treleaven + + * src/plugindata.h, src/plugins.c, plugins/geanyfunctions.h: + Add sci_get_lexer() to plugin API. + + 2010-11-01 Nick Treleaven * src/utils.c, src/main.c: diff --git a/plugins/geanyfunctions.h b/plugins/geanyfunctions.h index f3c7639bc..a356f8f8a 100644 --- a/plugins/geanyfunctions.h +++ b/plugins/geanyfunctions.h @@ -198,6 +198,8 @@ geany_functions->p_sci->sci_set_line_indentation #define sci_get_line_indentation \ geany_functions->p_sci->sci_get_line_indentation +#define sci_get_lexer \ + geany_functions->p_sci->sci_get_lexer #define templates_get_template_fileheader \ geany_functions->p_templates->templates_get_template_fileheader #define utils_str_equal \ diff --git a/src/plugindata.h b/src/plugindata.h index 2e95a8a3c..d0d10fb36 100644 --- a/src/plugindata.h +++ b/src/plugindata.h @@ -50,7 +50,7 @@ enum { /** The Application Programming Interface (API) version, incremented * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 196, + GEANY_API_VERSION = 197, /** The Application Binary Interface (ABI) version, incremented whenever * existing fields in the plugin data types have to be changed or reordered. */ @@ -384,6 +384,7 @@ typedef struct SciFuncs gint (*sci_find_text) (struct _ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf); void (*sci_set_line_indentation) (struct _ScintillaObject *sci, gint line, gint indent); gint (*sci_get_line_indentation) (struct _ScintillaObject *sci, gint line); + gint (*sci_get_lexer) (struct _ScintillaObject *sci); } SciFuncs; diff --git a/src/plugins.c b/src/plugins.c index 6292fadda..f2657b8f0 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -187,7 +187,8 @@ static SciFuncs sci_funcs = { &sci_goto_line, &sci_find_text, &sci_set_line_indentation, - &sci_get_line_indentation + &sci_get_line_indentation, + &sci_get_lexer }; static TemplateFuncs template_funcs = { -- 2.11.4.GIT