Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update for new PO styles

  • Loading branch information...
commit 4ffd446c43986385170a2e144f951557e101ec05 1 parent 2874357
@b4n b4n authored
View
9 data/filetypes.po
@@ -3,13 +3,20 @@
# Edit these in the colorscheme .conf file instead
default=default
comment=comment
+programmer_comment=comment_doc
+reference=comment
+flags=comment
+fuzzy=comment_doc_keyword
msgid=keyword_1
msgid_text=string_1
+msgid_text_eol=string_eol
msgstr=keyword_2
msgstr_text=string_1
+msgstr_text_eol=string_eol
msgctxt=keyword_3
msgctxt_text=string_1
-fuzzy=comment_doc_keyword
+msgctxt_text_eol=string_eol
+error=error
[settings]
# default extension used when saving files
View
11 src/highlighting.c
@@ -1469,6 +1469,14 @@ gboolean highlighting_is_string_style(gint lexer, gint style)
style == SCE_PL_XLAT
/* we don't include any STRING_*_VAR for autocompletion */);
+ case SCLEX_PO:
+ return (style == SCE_PO_MSGCTXT_TEXT ||
+ style == SCE_PO_MSGCTXT_TEXT_EOL ||
+ style == SCE_PO_MSGID_TEXT ||
+ style == SCE_PO_MSGID_TEXT_EOL ||
+ style == SCE_PO_MSGSTR_TEXT ||
+ style == SCE_PO_MSGSTR_TEXT_EOL);
+
case SCLEX_R:
return (style == SCE_R_STRING);
@@ -1610,7 +1618,8 @@ gboolean highlighting_is_comment_style(gint lexer, gint style)
return (style == SCE_PROPS_COMMENT);
case SCLEX_PO:
- return (style == SCE_PO_COMMENT);
+ return (style == SCE_PO_COMMENT ||
+ style == SCE_PO_PROGRAMMER_COMMENT);
case SCLEX_LATEX:
return (style == SCE_L_COMMENT ||
View
25 src/highlightingmappings.h
@@ -1080,15 +1080,22 @@ static const HLKeyword highlighting_keywords_PERL[] =
#define highlighting_lexer_PO SCLEX_PO
static const HLStyle highlighting_styles_PO[] =
{
- { SCE_PO_DEFAULT, "default", FALSE },
- { SCE_PO_COMMENT, "comment", FALSE },
- { SCE_PO_MSGID, "msgid", FALSE },
- { SCE_PO_MSGID_TEXT, "msgid_text", FALSE },
- { SCE_PO_MSGSTR, "msgstr", FALSE },
- { SCE_PO_MSGSTR_TEXT, "msgstr_text", FALSE },
- { SCE_PO_MSGCTXT, "msgctxt", FALSE },
- { SCE_PO_MSGCTXT_TEXT, "msgctxt_text", FALSE },
- { SCE_PO_FUZZY, "fuzzy", FALSE }
+ { SCE_PO_DEFAULT, "default", FALSE },
+ { SCE_PO_COMMENT, "comment", FALSE },
+ { SCE_PO_PROGRAMMER_COMMENT, "programmer_comment", FALSE },
+ { SCE_PO_REFERENCE, "reference", FALSE },
+ { SCE_PO_FLAGS, "flags", FALSE },
+ { SCE_PO_FUZZY, "fuzzy", FALSE },
+ { SCE_PO_MSGID, "msgid", FALSE },
+ { SCE_PO_MSGID_TEXT, "msgid_text", FALSE },
+ { SCE_PO_MSGID_TEXT_EOL, "msgid_text_eol", FALSE },
+ { SCE_PO_MSGSTR, "msgstr", FALSE },
+ { SCE_PO_MSGSTR_TEXT, "msgstr_text", FALSE },
+ { SCE_PO_MSGSTR_TEXT_EOL, "msgstr_text_eol", FALSE },
+ { SCE_PO_MSGCTXT, "msgctxt", FALSE },
+ { SCE_PO_MSGCTXT_TEXT, "msgctxt_text", FALSE },
+ { SCE_PO_MSGCTXT_TEXT_EOL, "msgctxt_text_eol", FALSE },
+ { SCE_PO_ERROR, "error", FALSE }
};
#define highlighting_keywords_PO EMPTY_KEYWORDS
#define highlighting_properties_PO EMPTY_PROPERTIES
Please sign in to comment.
Something went wrong with that request. Please try again.