mirror of
https://github.com/neovim/neovim.git
synced 2025-11-26 04:00:45 +00:00
vim-patch:7.4.524 #2559
Problem: When using ":ownsyntax" spell checking is messed up. (Issue 78) Solution: Use the window-local option values. (Christian Brabandt) https://github.com/vim/vim/commit/v7-4-524 See also https://code.google.com/p/vim/issues/detail?id=78
This commit is contained in:
committed by
Justin M. Keyes
parent
d3a57b9b0b
commit
96997fffbd
@@ -4013,17 +4013,16 @@ did_set_string_option (
|
|||||||
else if (varp == &p_cb) {
|
else if (varp == &p_cb) {
|
||||||
if (opt_strings_flags(p_cb, p_cb_values, &cb_flags, TRUE) != OK)
|
if (opt_strings_flags(p_cb, p_cb_values, &cb_flags, TRUE) != OK)
|
||||||
errmsg = e_invarg;
|
errmsg = e_invarg;
|
||||||
}
|
} else if (varp == &(curwin->w_s->b_p_spl)
|
||||||
/* When 'spelllang' or 'spellfile' is set and there is a window for this
|
|| varp == &(curwin->w_s->b_p_spf)) {
|
||||||
* buffer in which 'spell' is set load the wordlists. */
|
// When 'spelllang' or 'spellfile' is set and there is a window for this
|
||||||
else if (varp == &(curbuf->b_s.b_p_spl) || varp == &(curbuf->b_s.b_p_spf)) {
|
// buffer in which 'spell' is set load the wordlists.
|
||||||
int l;
|
if (varp == &(curwin->w_s->b_p_spf)) {
|
||||||
|
int l = (int)STRLEN(curwin->w_s->b_p_spf);
|
||||||
if (varp == &(curbuf->b_s.b_p_spf)) {
|
if (l > 0
|
||||||
l = (int)STRLEN(curbuf->b_s.b_p_spf);
|
&& (l < 4 || STRCMP(curwin->w_s->b_p_spf + l - 4, ".add") != 0)) {
|
||||||
if (l > 0 && (l < 4 || STRCMP(curbuf->b_s.b_p_spf + l - 4,
|
|
||||||
".add") != 0))
|
|
||||||
errmsg = e_invarg;
|
errmsg = e_invarg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errmsg == NULL) {
|
if (errmsg == NULL) {
|
||||||
|
|||||||
@@ -5404,11 +5404,10 @@ void ex_ownsyntax(exarg_T *eap)
|
|||||||
if (curwin->w_s == &curwin->w_buffer->b_s) {
|
if (curwin->w_s == &curwin->w_buffer->b_s) {
|
||||||
curwin->w_s = xmalloc(sizeof(synblock_T));
|
curwin->w_s = xmalloc(sizeof(synblock_T));
|
||||||
memset(curwin->w_s, 0, sizeof(synblock_T));
|
memset(curwin->w_s, 0, sizeof(synblock_T));
|
||||||
|
// TODO: Keep the spell checking as it was.
|
||||||
curwin->w_p_spell = FALSE; /* No spell checking */
|
curwin->w_p_spell = FALSE; /* No spell checking */
|
||||||
clear_string_option(&curwin->w_s->b_p_spc);
|
clear_string_option(&curwin->w_s->b_p_spc);
|
||||||
clear_string_option(&curwin->w_s->b_p_spf);
|
clear_string_option(&curwin->w_s->b_p_spf);
|
||||||
vim_regfree(curwin->w_s->b_cap_prog);
|
|
||||||
curwin->w_s->b_cap_prog = NULL;
|
|
||||||
clear_string_option(&curwin->w_s->b_p_spl);
|
clear_string_option(&curwin->w_s->b_p_spl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ static int included_patches[] = {
|
|||||||
527,
|
527,
|
||||||
526,
|
526,
|
||||||
525,
|
525,
|
||||||
//524,
|
524,
|
||||||
//523 NA
|
//523 NA
|
||||||
//522 NA
|
//522 NA
|
||||||
521,
|
521,
|
||||||
|
|||||||
Reference in New Issue
Block a user