From 56de0f66418981b8a465a504d93cf296adb6d4d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 25 Jul 2008 09:48:55 +0000 Subject: [PATCH] Add missing "error" and heredoc styles to filetype Shellscript (related to #2026853). git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2814 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 7 +++++++ data/filetypes.sh | 3 +++ src/highlighting.c | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ddc92659..081593cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-25 Enrico Tröger + + * data/filetypes.sh, src/highlighting.c: + Add missing "error" and heredoc styles to filetype Shellscript + (related to #2026853). + + 2008-07-24 Nick Treleaven * src/filetypes.c: diff --git a/data/filetypes.sh b/data/filetypes.sh index 82215aec..639b4132 100644 --- a/data/filetypes.sh +++ b/data/filetypes.sh @@ -12,6 +12,9 @@ identifier=0x000000;0xffffff;false;false backticks=0x000000;0xd0d0d0;false;false param=0x009f00;0xffffff;false;false scalar=0x105090;0xffffff;false;false +error=0xff0000;0xffffff;false;false +here_delim=0x000000;0xddd0dd;false;false +here_q=0x7f007f;0xddd0dd;false;false [keywords] primary=break case continue do done elif else esac eval exit export fi for function goto if in integer return set shift then until while diff --git a/src/highlighting.c b/src/highlighting.c index c5570850..81da0d73 100644 --- a/src/highlighting.c +++ b/src/highlighting.c @@ -1581,7 +1581,7 @@ static void styleset_ruby(ScintillaObject *sci) static void styleset_sh_init(gint ft_id, GKeyFile *config, GKeyFile *config_home) { - new_style_array(GEANY_FILETYPES_SH, 11); + new_style_array(GEANY_FILETYPES_SH, 14); get_keyfile_hex(config, config_home, "styling", "default", "0x000000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_SH].styling[0]); get_keyfile_style(config, config_home, "commentline", &gsd_comment, &style_sets[GEANY_FILETYPES_SH].styling[1]); get_keyfile_hex(config, config_home, "styling", "number", "0x007f00", "0xffffff", "false", &style_sets[GEANY_FILETYPES_SH].styling[2]); @@ -1593,6 +1593,9 @@ static void styleset_sh_init(gint ft_id, GKeyFile *config, GKeyFile *config_home get_keyfile_hex(config, config_home, "styling", "backticks", "0x000000", "0xe0c0e0", "false", &style_sets[GEANY_FILETYPES_SH].styling[8]); get_keyfile_hex(config, config_home, "styling", "param", "0x9f0000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_SH].styling[9]); get_keyfile_hex(config, config_home, "styling", "scalar", "0x105090", "0xffffff", "false", &style_sets[GEANY_FILETYPES_SH].styling[10]); + get_keyfile_hex(config, config_home, "styling", "error", "0xff0000", "0xffffff", "false", &style_sets[GEANY_FILETYPES_SH].styling[11]); + get_keyfile_hex(config, config_home, "styling", "here_delim", "0x000000", "0xddd0dd", "false", &style_sets[GEANY_FILETYPES_SH].styling[12]); + get_keyfile_hex(config, config_home, "styling", "here_q", "0x7f007f", "0xddd0dd", "false", &style_sets[GEANY_FILETYPES_SH].styling[13]); style_sets[GEANY_FILETYPES_SH].keywords = g_new(gchar*, 2); get_keyfile_keywords(config, config_home, "keywords", "primary", GEANY_FILETYPES_SH, 0, "break case continue do done elif else esac eval exit export fi for goto if in integer return set shift then until while"); @@ -1625,6 +1628,9 @@ static void styleset_sh(ScintillaObject *sci) set_sci_style(sci, SCE_SH_BACKTICKS, GEANY_FILETYPES_SH, 8); set_sci_style(sci, SCE_SH_PARAM, GEANY_FILETYPES_SH, 9); set_sci_style(sci, SCE_SH_SCALAR, GEANY_FILETYPES_SH, 10); + set_sci_style(sci, SCE_SH_ERROR, GEANY_FILETYPES_SH, 11); + set_sci_style(sci, SCE_SH_HERE_DELIM, GEANY_FILETYPES_SH, 12); + set_sci_style(sci, SCE_SH_HERE_Q, GEANY_FILETYPES_SH, 13); }