summaryrefslogtreecommitdiff
path: root/src/spell.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-09-29 13:38:29 +0200
committerBram Moolenaar <Bram@vim.org>2013-09-29 13:38:29 +0200
commit7a18fdc8a4d3c1408f54074ff9268735a277093a (patch)
tree7fb0e40d840bfdecf4e6ab98e69fe6d148176da8 /src/spell.c
parent033d8888e8d6648b5540dc3dda85aba3c5a192de (diff)
downloadvim-git-7a18fdc8a4d3c1408f54074ff9268735a277093a.tar.gz
updated for version 7.4.042v7.4.042
Problem: When using ":setlocal" for 'spell' and 'spellang' then :spelldump doesn't work. (Dimitar Dimitrov) Solution: Copy the option variables to the new window used to show the dump. (Christian Brabandt)
Diffstat (limited to 'src/spell.c')
-rw-r--r--src/spell.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/spell.c b/src/spell.c
index 3ee8b02ac..2972fe915 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -15569,11 +15569,21 @@ ex_spellinfo(eap)
ex_spelldump(eap)
exarg_T *eap;
{
+ char_u *spl;
+ long dummy;
+
if (no_spell_checking(curwin))
return;
+ get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
- /* Create a new empty buffer by splitting the window. */
+ /* Create a new empty buffer in a new window. */
do_cmdline_cmd((char_u *)"new");
+
+ /* enable spelling locally in the new window */
+ set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
+ set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL);
+ vim_free(spl);
+
if (!bufempty() || !buf_valid(curbuf))
return;