Revision: 486 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=486&view=rev Author: eht16 Date: 2009-02-17 14:52:25 +0000 (Tue, 17 Feb 2009)
Log Message: ----------- Synchronise lexer checks with Geany's new filetypes.
Modified Paths: -------------- trunk/spellcheck/ChangeLog trunk/spellcheck/src/speller.c
Modified: trunk/spellcheck/ChangeLog =================================================================== --- trunk/spellcheck/ChangeLog 2009-02-17 14:32:18 UTC (rev 485) +++ trunk/spellcheck/ChangeLog 2009-02-17 14:52:25 UTC (rev 486) @@ -14,6 +14,8 @@ * src/gui.c, src/gui.h, src/scplugin.c, src/scplugin.h, src/speller.c, src/speller.h: Prefix all non-static functions which sc_ to avoid symbol clashes. + * src/speller.c: + Synchronise lexer checks with Geany's new filetypes.
2009-02-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/spellcheck/src/speller.c =================================================================== --- trunk/spellcheck/src/speller.c 2009-02-17 14:32:18 UTC (rev 485) +++ trunk/spellcheck/src/speller.c 2009-02-17 14:52:25 UTC (rev 486) @@ -431,15 +431,30 @@ g_return_val_if_fail(doc != NULL, FALSE); g_return_val_if_fail(pos >= 0, FALSE);
- lexer = scintilla_send_message(doc->editor->sci, SCI_GETLEXER, 0, 0); style = sci_get_style_at(doc->editor->sci, pos); + /* early out for the default style */ + if (style == STYLE_DEFAULT) + return TRUE;
+ lexer = scintilla_send_message(doc->editor->sci, SCI_GETLEXER, 0, 0); switch (lexer) { - /* early out for the default style */ - if (style == STYLE_DEFAULT) - return TRUE; - + case SCLEX_ADA: + { + switch (style) + { + case SCE_ADA_DEFAULT: + case SCE_ADA_COMMENTLINE: + case SCE_ADA_STRING: + case SCE_ADA_STRINGEOL: + case SCE_ADA_CHARACTER: + case SCE_ADA_CHARACTEREOL: + return TRUE; + default: + return FALSE; + } + break; + } case SCLEX_ASM: { switch (style) @@ -506,6 +521,22 @@ } break; } + case SCLEX_CMAKE: + { + switch (style) + { + case SCE_CMAKE_DEFAULT: + case SCE_CMAKE_COMMENT: + case SCE_CMAKE_STRINGDQ: + case SCE_CMAKE_STRINGLQ: + case SCE_CMAKE_STRINGRQ: + case SCE_CMAKE_STRINGVAR: + return TRUE; + default: + return FALSE; + } + break; + } case SCLEX_CSS: { switch (style) @@ -718,6 +749,23 @@ } break; } + case SCLEX_NSIS: + { + switch (style) + { + case SCE_NSIS_DEFAULT: + case SCE_NSIS_COMMENT: + case SCE_NSIS_STRINGDQ: + case SCE_NSIS_STRINGLQ: + case SCE_NSIS_STRINGRQ: + case SCE_NSIS_STRINGVAR: + case SCE_NSIS_COMMENTBOX: + return TRUE; + default: + return FALSE; + } + break; + } case SCLEX_PERL: { switch (style) @@ -856,6 +904,19 @@ } break; } + case SCLEX_YAML: + { + switch (style) + { + case SCE_YAML_DEFAULT: + case SCE_YAML_COMMENT: + case SCE_YAML_TEXT: + return TRUE; + default: + return FALSE; + } + break; + } } /* if the current lexer was not handled, let's say the passed position contains * valid text to not ignore more than we want */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.