On Mo, 23 Sep 2013, Bram Moolenaar wrote:

> Christian Brabandt wrote:
> 
> > Hi Dimitar!
> > 
> > On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:
> > 
> > > Hi,
> > > 
> > > Here is what I tried:
> > > :setlocal spelllang=bg spell
> > > then
> > > :spelldump
> > > and all I get is an empty window
> > > 'local' is the issue, with a simple :set it all works.
> > > I reckon the solution would be to take the settings from the current 
> > > window and use them in the new results window.
> > 
> > This patch fixes it:
> > 
[...]
> 
> Looks like this doesn't take care of 'spelllang' when it was set local
> to the window.

Indeed. Here is an updated patch:

diff --git a/src/spell.c b/src/spell.c
--- a/src/spell.c
+++ b/src/spell.c
@@ -15580,11 +15580,20 @@
 ex_spelldump(eap)
     exarg_T *eap;
 {
+    char_u *spl;
+    long dummy;
+
     if (no_spell_checking(curwin))
        return;
 
     /* Create a new empty buffer by splitting the window. */
+    get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
     do_cmdline_cmd((char_u *)"new");
+
+    /* enable spelling locally */
+    set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
+    set_option_value((char_u*)"spl",  dummy,         spl, OPT_LOCAL);
+
     if (!bufempty() || !buf_valid(curbuf))
        return;
 

regards,
Christian
-- 
Wer keine Liebe fühlt, muss schmeicheln lernen, sonst kommt er 
nicht aus.
                -- Goethe, Maximen und Reflektionen, Nr. 317

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui