Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 28 May 2015 15:55:46 UTC Commit: 3c9e5459748a9f46fbdcee7811e51ae75c17fd36 https://github.com/geany/geany/commit/3c9e5459748a9f46fbdcee7811e51ae75c17fd...
Log Message: ----------- Merge pull request #501 from b4n/wordchars-default
Respect filetype.common's wordchars if a filetype doesn't have its own
Modified Paths: -------------- data/filetypes.common doc/geany.txt src/highlighting.c
Modified: data/filetypes.common 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -97,6 +97,7 @@ calltips=call_tips # which characters should be skipped when moving (or included when deleting) to word boundaries # should always include space and tab (\s\t) whitespace_chars=\s\t!"#$%&'()*+,-./:;<=>?@[\]^`{|}~ +#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
[named_styles] # This is the Default "built-in" color scheme
Modified: doc/geany.txt 12 lines changed, 11 insertions(+), 1 deletions(-) =================================================================== @@ -4170,7 +4170,8 @@ wordchars *Example:* (look at system filetypes.* files)
.. note:: - This overrides the *whitespace_chars* filetypes.common setting. + This overrides the *wordchars* filetypes.common setting, and + has precedence over the *whitespace_chars* setting.
comment_single A character or string which is used to comment code. If you want to use @@ -4652,6 +4653,15 @@ whitespace_chars
*Example:* ``whitespace_chars=\s\t!"#$%&'()*+,-./:;<=>?@[\]^`{|}~``
+wordchars + These characters define word boundaries when making selections + and searching using word matching options. + + *Example:* ``wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`` + + .. note:: + This has precedence over the *whitespace_chars* setting. +
Filetype extensions
Modified: src/highlighting.c 10 lines changed, 6 insertions(+), 4 deletions(-) =================================================================== @@ -171,10 +171,11 @@ static void get_keyfile_keywords(GKeyFile *config, GKeyFile *configh, }
-static void get_keyfile_wordchars(GKeyFile *config, GKeyFile *configh, gchar **wordchars) +static void get_keyfile_wordchars(GKeyFile *config, GKeyFile *configh, gchar **wordchars, + const gchar *default_wordchars) { *wordchars = utils_get_setting(string, configh, config, - "settings", "wordchars", GEANY_WORDCHARS); + "settings", "wordchars", default_wordchars); }
@@ -578,7 +579,7 @@ static void styleset_common_init(GKeyFile *config, GKeyFile *config_home) 0, 0, &common_style_set.styling[GCS_LINE_HEIGHT]);
g_free(common_style_set.wordchars); - get_keyfile_wordchars(config, config_home, &common_style_set.wordchars); + get_keyfile_wordchars(config, config_home, &common_style_set.wordchars, GEANY_WORDCHARS); g_free(whitespace_chars); whitespace_chars = get_keyfile_whitespace_chars(config, config_home); } @@ -1054,7 +1055,8 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co }
/* should be done in filetypes.c really: */ - get_keyfile_wordchars(config, configh, &style_sets[filetype_idx].wordchars); + get_keyfile_wordchars(config, configh, &style_sets[filetype_idx].wordchars, + common_style_set.wordchars); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).