Mercurial > vim
comparison src/option.c @ 5477:853a76c7fded v7.4.088
updated for version 7.4.088
Problem: When spell checking is enabled Asian characters are always marked
as error.
Solution: When 'spelllang' contains "cjk" do not mark Asian characters as
error. (Ken Takata)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 12 Nov 2013 04:44:01 +0100 |
parents | 6ae816249627 |
children | 2ace11abcfb5 |
comparison
equal
deleted
inserted
replaced
5476:63314ae20838 | 5477:853a76c7fded |
---|---|
7120 #endif | 7120 #endif |
7121 #ifdef FEAT_SPELL | 7121 #ifdef FEAT_SPELL |
7122 if (varp == &(curwin->w_s->b_p_spl)) | 7122 if (varp == &(curwin->w_s->b_p_spl)) |
7123 { | 7123 { |
7124 char_u fname[200]; | 7124 char_u fname[200]; |
7125 char_u *q = curwin->w_s->b_p_spl; | |
7126 | |
7127 /* Skip the first name if it is "cjk". */ | |
7128 if (STRNCMP(q, "cjk,", 4) == 0) | |
7129 q += 4; | |
7125 | 7130 |
7126 /* | 7131 /* |
7127 * Source the spell/LANG.vim in 'runtimepath'. | 7132 * Source the spell/LANG.vim in 'runtimepath'. |
7128 * They could set 'spellcapcheck' depending on the language. | 7133 * They could set 'spellcapcheck' depending on the language. |
7129 * Use the first name in 'spelllang' up to '_region' or | 7134 * Use the first name in 'spelllang' up to '_region' or |
7130 * '.encoding'. | 7135 * '.encoding'. |
7131 */ | 7136 */ |
7132 for (p = curwin->w_s->b_p_spl; *p != NUL; ++p) | 7137 for (p = q; *p != NUL; ++p) |
7133 if (vim_strchr((char_u *)"_.,", *p) != NULL) | 7138 if (vim_strchr((char_u *)"_.,", *p) != NULL) |
7134 break; | 7139 break; |
7135 vim_snprintf((char *)fname, 200, "spell/%.*s.vim", | 7140 vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q); |
7136 (int)(p - curwin->w_s->b_p_spl), curwin->w_s->b_p_spl); | |
7137 source_runtime(fname, TRUE); | 7141 source_runtime(fname, TRUE); |
7138 } | 7142 } |
7139 #endif | 7143 #endif |
7140 } | 7144 } |
7141 | 7145 |