Skip to content

Commit

Permalink
Allow to configure the error indicator color
Browse files Browse the repository at this point in the history
Related to #1116.
  • Loading branch information
b4n committed Oct 24, 2016
1 parent d3b0bbe commit bee3806
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions data/filedefs/filetypes.common
Expand Up @@ -93,6 +93,9 @@ line_height=0;0;
# 4th argument is true to override default background of calltips
calltips=call_tips

# error indicator color
indicator_error=0xff0000

[settings]
# which characters should be skipped when moving (or included when deleting) to word boundaries
# should always include space and tab (\s\t)
Expand Down
7 changes: 7 additions & 0 deletions doc/geany.txt
Expand Up @@ -4593,6 +4593,13 @@ calltips

*Example:* ``calltips=0xc0c0c0;0xffffff;false;false``

indicator_error
The color of the error indicator.

Only the first argument (foreground color) is used.

*Example:* ``indicator_error=0xff0000``


[settings] section
``````````````````
Expand Down
5 changes: 4 additions & 1 deletion src/highlighting.c
Expand Up @@ -97,6 +97,7 @@ enum /* Geany common styling */
GCS_MARKER_TRANSLUCENCY,
GCS_LINE_HEIGHT,
GCS_CALLTIPS,
GCS_INDICATOR_ERROR,
GCS_MAX
};

Expand Down Expand Up @@ -560,6 +561,7 @@ static void styleset_common_init(GKeyFile *config, GKeyFile *config_home)
get_keyfile_style(config, config_home, "marker_search", &common_style_set.styling[GCS_MARKER_SEARCH]);
get_keyfile_style(config, config_home, "marker_mark", &common_style_set.styling[GCS_MARKER_MARK]);
get_keyfile_style(config, config_home, "calltips", &common_style_set.styling[GCS_CALLTIPS]);
get_keyfile_style(config, config_home, "indicator_error", &common_style_set.styling[GCS_INDICATOR_ERROR]);

get_keyfile_ints(config, config_home, "styling", "folding_style",
1, 1, &common_style_set.fold_marker, &common_style_set.fold_lines);
Expand Down Expand Up @@ -649,7 +651,8 @@ static void styleset_common(ScintillaObject *sci, guint ft_id)

/* Error indicator */
SSM(sci, SCI_INDICSETSTYLE, GEANY_INDICATOR_ERROR, INDIC_SQUIGGLEPIXMAP);
SSM(sci, SCI_INDICSETFORE, GEANY_INDICATOR_ERROR, invert(0x0000FF /* red, in BGR */));
SSM(sci, SCI_INDICSETFORE, GEANY_INDICATOR_ERROR,
invert(common_style_set.styling[GCS_INDICATOR_ERROR].foreground));

/* Search indicator, used for 'Mark' matches */
SSM(sci, SCI_INDICSETSTYLE, GEANY_INDICATOR_SEARCH, INDIC_ROUNDBOX);
Expand Down

0 comments on commit bee3806

Please sign in to comment.