Hi Nazri!

On Di, 05 Feb 2013, Nazri Ramliy wrote:

> While working on this I noticed another bug, found in vanilla vim
> changeset:   4089:30b3b1da0350:
> 
> $ src/vim -u NONE -U NONE src/misc1.c  -c 'set nu|for i in
> range(5)|split|endfor'
> :" Now we should have 6 windows for src/misc1.c, go to the bottom window
> :5wincmd j
> :" Go to the last line in the window
> :normal L
> :windo set nu?
>   number
>   number
>   10808 }
>   number
>   number
>   number
> Press ENTER or type command to continue
> 
> And notice that one or two of the output of "windo set nu?" includes
> some text from the buffer.

Also, the numbering is wrong after :windo executes and it this is really 
strange, I noticed the cursor is displayed wrong in the last window and 
even a :redraw! does not correct it. For me it is displayed in the 2nd 
line, while :line('.') outputs :1

This patch fixes it:

diff --git a/src/window.c b/src/window.c
--- a/src/window.c
+++ b/src/window.c
@@ -3962,10 +3962,6 @@
 win_goto(wp)
     win_T      *wp;
 {
-#ifdef FEAT_CONCEAL
-    win_T      *owp = curwin;
-#endif
-
     if (text_locked())
     {
        beep_flush();
@@ -3988,13 +3984,6 @@
     need_mouse_correct = TRUE;
 #endif
     win_enter(wp, TRUE);
-
-#ifdef FEAT_CONCEAL
-    /* Conceal cursor line in previous window, unconceal in current window. */
-    if (win_valid(owp))
-       update_single_line(owp, owp->w_cursor.lnum);
-    update_single_line(curwin, curwin->w_cursor.lnum);
-#endif
 }
 
 #if defined(FEAT_PERL) || defined(PROTO)


I don't know, why Vim needs to redraw the cursor-line when executing the 
windo command and I think it will redraw afterwards anyways, so it 
should be safe to remove those lines.


regards,
Christian
-- 
Es gibt Leute, die nur aus dem Grunde in jeder Suppe ein Haar finden,
weil sie, wenn sie davor sitzen, so lange den Kopf schütteln, bis eins
hineinfällt.
                -- Christian Friedrich Hebbel

-- 
-- 
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