Branch: refs/heads/master Author: Nick Treleaven nick.treleaven@btinternet.com Committer: Nick Treleaven nick.treleaven@btinternet.com Date: Sun, 03 Jun 2012 16:38:30 Commit: dd87e318cf846db3b3af1481942637969e891557 https://github.com/geany/geany/commit/dd87e318cf846db3b3af1481942637969e8915...
Log Message: ----------- Fix applying default selection colors after editing 'selection' style
Default colors were not restored when disabling the override flags.
Modified Paths: -------------- src/highlighting.c
Modified: src/highlighting.c 9 files changed, 5 insertions(+), 4 deletions(-) =================================================================== @@ -630,6 +630,8 @@ static void styleset_common_init(GKeyFile *config, GKeyFile *config_home)
static void styleset_common(ScintillaObject *sci, guint ft_id) { + GeanyLexerStyle *style; + SSM(sci, SCI_STYLECLEARALL, 0, 0);
SSM(sci, SCI_SETWORDCHARS, 0, (sptr_t) (ft_id == GEANY_FILETYPES_NONE ? @@ -787,12 +789,11 @@ static void styleset_common(ScintillaObject *sci, guint ft_id) sci_set_property(sci, "fold.preprocessor", "1"); sci_set_property(sci, "fold.at.else", "1");
+ style = &common_style_set.styling[GCS_SELECTION]; /* bold (3rd argument) is whether to override default foreground selection */ - if (common_style_set.styling[GCS_SELECTION].bold) - SSM(sci, SCI_SETSELFORE, 1, invert(common_style_set.styling[GCS_SELECTION].foreground)); + SSM(sci, SCI_SETSELFORE, style->bold, invert(style->foreground)); /* italic (4th argument) is whether to override default background selection */ - if (common_style_set.styling[GCS_SELECTION].italic) - SSM(sci, SCI_SETSELBACK, 1, invert(common_style_set.styling[GCS_SELECTION].background)); + SSM(sci, SCI_SETSELBACK, style->italic, invert(style->background));
SSM(sci, SCI_SETSTYLEBITS, SSM(sci, SCI_GETSTYLEBITSNEEDED, 0, 0), 0);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).